summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-04-22 11:11:39 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-04-22 11:11:39 +0000
commit5212643f256d5cf75b295aeb42783c81ce033519 (patch)
tree0b5e5bb0c5ebe0d0d692663f37327cefc80a5316 /protocols/JabberG/src/jabber_proto.cpp
parentbd9c37190715b10445fd3135b235062b33dc302c (diff)
preventing troubles with nick = NULL
git-svn-id: http://svn.miranda-ng.org/main/trunk@16743 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_proto.cpp')
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp24
1 files changed, 8 insertions, 16 deletions
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index 67b6c4bd22..c87952787a 100644
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -241,25 +241,17 @@ int CJabberProto::OnModulesLoadedEx(WPARAM, LPARAM)
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
SetContactOfflineStatus(hContact);
- if (isChatRoom(hContact)) {
- ptrT jid(getTStringA(hContact, "ChatRoomID"));
- if (jid != NULL)
- ListAdd(LIST_CHATROOM, jid, hContact);
- continue;
- }
-
- ptrT jid(getTStringA(hContact, "jid"));
- if (jid == NULL)
- continue;
+ if (getByte(hContact, "IsTransport", 0)) {
+ ptrT jid(getTStringA(hContact, "jid"));
+ if (jid == NULL)
+ continue;
- ListAdd(LIST_ROSTER, jid, hContact);
+ TCHAR *resourcepos = _tcschr(jid, '/');
+ if (resourcepos != NULL)
+ *resourcepos = '\0';
- TCHAR *resourcepos = _tcschr(jid, '/');
- if (resourcepos != NULL)
- *resourcepos = '\0';
-
- if (getByte(hContact, "IsTransport", 0))
m_lstTransports.insert(mir_tstrdup(jid));
+ }
}
return 0;