From 8d371aa2b1fa5a7bfe835dee9b60d1407b33047b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 12 Mar 2014 13:40:35 +0000 Subject: db_event_next/db_event_prev: first parameter hContact added git-svn-id: http://svn.miranda-ng.org/main/trunk@8576 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/GTalkExt/src/notifications.cpp | 2 +- protocols/JabberG/src/jabber_archive.cpp | 8 ++++---- protocols/JabberG/src/jabber_rc.cpp | 4 ++-- protocols/SkypeClassic/src/skype.cpp | 5 ++--- 4 files changed, 9 insertions(+), 10 deletions(-) (limited to 'protocols') diff --git a/protocols/GTalkExt/src/notifications.cpp b/protocols/GTalkExt/src/notifications.cpp index d3405bf677..da06851c8e 100644 --- a/protocols/GTalkExt/src/notifications.cpp +++ b/protocols/GTalkExt/src/notifications.cpp @@ -294,7 +294,7 @@ void ClearNotificationContactHistory(LPCSTR acc) return; for (HANDLE hEvent = db_event_first(hContact); hEvent;) { - HANDLE hEvent1 = db_event_next(hEvent); + HANDLE hEvent1 = db_event_next(hContact, hEvent); db_event_delete(hContact, hEvent); hEvent = hEvent1; } diff --git a/protocols/JabberG/src/jabber_archive.cpp b/protocols/JabberG/src/jabber_archive.cpp index ae4e61ad05..91752216a0 100644 --- a/protocols/JabberG/src/jabber_archive.cpp +++ b/protocols/JabberG/src/jabber_archive.cpp @@ -159,7 +159,7 @@ BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei) return TRUE; // find event with another timestamp - hExistingDbEvent = db_event_next(hPreviousDbEvent); + hExistingDbEvent = db_event_next(hContact, hPreviousDbEvent); while (hExistingDbEvent != NULL) { ZeroMemory(&dbeiExisting, sizeof(dbeiExisting)); dbeiExisting.cbSize = sizeof(dbeiExisting); @@ -173,7 +173,7 @@ BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei) } hPreviousDbEvent = hExistingDbEvent; - hExistingDbEvent = db_event_next(hExistingDbEvent); + hExistingDbEvent = db_event_next(hContact, hExistingDbEvent); } } @@ -206,7 +206,7 @@ BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei) } // Get previous event in chain - hExistingDbEvent = db_event_prev(hExistingDbEvent); + hExistingDbEvent = db_event_prev(hContact, hExistingDbEvent); } } else { @@ -236,7 +236,7 @@ BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei) } // Get next event in chain - hExistingDbEvent = db_event_next(hExistingDbEvent); + hExistingDbEvent = db_event_next(hContact, hExistingDbEvent); } } // reset last event diff --git a/protocols/JabberG/src/jabber_rc.cpp b/protocols/JabberG/src/jabber_rc.cpp index 43be114329..cc6dedf04f 100644 --- a/protocols/JabberG/src/jabber_rc.cpp +++ b/protocols/JabberG/src/jabber_rc.cpp @@ -469,7 +469,7 @@ int CJabberProto::RcGetUnreadEventsCount() ptrT jid( getTStringA(hContact, "jid")); if (jid == NULL) continue; - for (HANDLE hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hDbEvent)) { + for (HANDLE hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hContact, hDbEvent)) { DBEVENTINFO dbei = { sizeof(dbei) }; dbei.cbBlob = db_event_getBlobSize(hDbEvent); if (dbei.cbBlob == -1) @@ -556,7 +556,7 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe if (tszJid == NULL) continue; - for (HANDLE hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hDbEvent)) { + for (HANDLE hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hContact, hDbEvent)) { DBEVENTINFO dbei = { sizeof(dbei) }; dbei.cbBlob = db_event_getBlobSize(hDbEvent); if (dbei.cbBlob == -1) diff --git a/protocols/SkypeClassic/src/skype.cpp b/protocols/SkypeClassic/src/skype.cpp index 3cc41e1113..cf542c7b62 100644 --- a/protocols/SkypeClassic/src/skype.cpp +++ b/protocols/SkypeClassic/src/skype.cpp @@ -1649,8 +1649,8 @@ void EndCallThread(char *szSkypeMsg) { db_event_markRead(hContact,hDbEvent); CallService(MS_CLIST_REMOVEEVENT,hContact,(LPARAM)hDbEvent); } - if (dbei.pBlob) free(dbei.pBlob); - hDbEvent=db_event_next(hDbEvent); + free(dbei.pBlob); + hDbEvent=db_event_next(hContact, hDbEvent); } } @@ -3133,7 +3133,6 @@ extern "C" int __declspec(dllexport) Load(void) BOOL SkypeInstalled; BOOL UseCustomCommand; WSADATA wsaData; - char path[MAX_PATH]; mir_getLP(&pluginInfo); -- cgit v1.2.3