From 425e0f8eb79c6779ebe40f75cce92194ed103389 Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Sat, 29 Nov 2014 14:02:02 +0000 Subject: VKontakte: replace (MCONTACT)-1 to INVALID_CONTACT_ID fix freeze contacts in online status git-svn-id: http://svn.miranda-ng.org/main/trunk@11150 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/misc.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'protocols/VKontakte/src/misc.cpp') diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 4b6b9af959..ab404f82c9 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -456,7 +456,7 @@ MCONTACT CVkProto::MContactFromDbEvent(HANDLE hDbEvent) { debugLogA("CVkProto::MContactFromDbEvent"); if (!hDbEvent || !IsOnline()) - return (MCONTACT)-1; + return INVALID_CONTACT_ID; DWORD body[2]; DBEVENTINFO dbei = { sizeof(dbei) }; @@ -464,9 +464,9 @@ MCONTACT CVkProto::MContactFromDbEvent(HANDLE hDbEvent) dbei.pBlob = (PBYTE)&body; if (db_event_get(hDbEvent, &dbei)) - return (MCONTACT)-1; + return INVALID_CONTACT_ID; if (dbei.eventType != EVENTTYPE_AUTHREQUEST || strcmp(dbei.szModule, m_szModuleName)) - return (MCONTACT)-1; + return INVALID_CONTACT_ID; MCONTACT hContact = DbGetAuthEventContact(&dbei); db_unset(hContact, m_szModuleName, "ReqAuth"); @@ -475,7 +475,7 @@ MCONTACT CVkProto::MContactFromDbEvent(HANDLE hDbEvent) void CVkProto::SetMirVer(MCONTACT hContact, int platform) { - if (hContact == NULL || hContact == -1) + if (hContact == NULL || hContact == INVALID_CONTACT_ID) return; if (platform == -1){ db_unset(hContact, m_szModuleName, "MirVer"); -- cgit v1.2.3