diff options
author | George Hazan <george.hazan@gmail.com> | 2016-04-13 15:08:47 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-04-13 15:08:47 +0000 |
commit | fdc5bdfae8a4a70cfd91ec0a8554005a3c0bbae2 (patch) | |
tree | 8218d1ecb0d5306907f8809bd0b714126c28e675 /protocols/JabberG/src/jabber_disco.cpp | |
parent | e3a9aa77869d8175d8a8483be6f1a976b5c0e1c4 (diff) |
sorted lists are used now in Jabber instead of linear database lookup
git-svn-id: http://svn.miranda-ng.org/main/trunk@16642 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_disco.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_disco.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp index 50b6e873d7..d11f05d097 100644 --- a/protocols/JabberG/src/jabber_disco.cpp +++ b/protocols/JabberG/src/jabber_disco.cpp @@ -1394,9 +1394,9 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM {
MCONTACT hContact = HContactFromJID(pNode->GetJid());
if (!hContact) {
- hContact = DBCreateContact(pNode->GetJid(), pNode->GetName(), TRUE, FALSE);
- JABBER_LIST_ITEM *item = ListAdd(LIST_VCARD_TEMP, pNode->GetJid());
- item->bUseResource = TRUE;
+ hContact = DBCreateContact(pNode->GetJid(), pNode->GetName(), true, false);
+ JABBER_LIST_ITEM *item = ListAdd(LIST_VCARD_TEMP, pNode->GetJid(), hContact);
+ item->bUseResource = true;
}
HMENU hContactMenu = Menu_BuildContactMenu(hContact);
GetCursorPos(&pt);
@@ -1413,8 +1413,8 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM hContact = AddToListByJID(jid, PALF_TEMPORARY);
if (ListGetItemPtr(LIST_VCARD_TEMP, pNode->GetJid()) == NULL) {
- JABBER_LIST_ITEM *item = ListAdd(LIST_VCARD_TEMP, pNode->GetJid());
- item->bUseResource = TRUE;
+ JABBER_LIST_ITEM *item = ListAdd(LIST_VCARD_TEMP, pNode->GetJid(), hContact);
+ item->bUseResource = true;
if (item->arResources.getCount() == 0)
ListAddResource(LIST_VCARD_TEMP, jid, ID_STATUS_OFFLINE, NULL, 0);
}
@@ -1424,10 +1424,10 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM case SD_ACT_ROSTER:
{
- MCONTACT hContact = DBCreateContact(pNode->GetJid(), pNode->GetName(), FALSE, FALSE);
+ MCONTACT hContact = DBCreateContact(pNode->GetJid(), pNode->GetName(), false, false);
db_unset(hContact, "CList", "NotOnList");
- JABBER_LIST_ITEM *item = ListAdd(LIST_VCARD_TEMP, pNode->GetJid());
- item->bUseResource = TRUE;
+ JABBER_LIST_ITEM *item = ListAdd(LIST_VCARD_TEMP, pNode->GetJid(), hContact);
+ item->bUseResource = true;
}
break;
|