summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/misc.cpp
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2016-06-24 08:49:49 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2016-06-24 08:49:49 +0000
commitfe4cec89d652ba57f7a47d98fb320f710b33ae98 (patch)
treeec60d2e26ad90cd8de31a029d6bb9aeb9fa20b89 /protocols/VKontakte/src/misc.cpp
parent3d01a16121bbdaf4b324f375e28d6e6b0feb4fed (diff)
VKontakte:
added friend_accepted notification type version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@17026 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r--protocols/VKontakte/src/misc.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index a075efef8f..b2d05a04e1 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -496,21 +496,22 @@ void CVkProto::ApplyCookies(AsyncHttpRequest *pReq)
void __cdecl CVkProto::DBAddAuthRequestThread(void *p)
{
- MCONTACT hContact = (UINT_PTR)p;
- if (hContact == NULL || hContact == INVALID_CONTACT_ID || !IsOnline())
+ CVkDBAddAuthRequestThreadParam *param = (CVkDBAddAuthRequestThreadParam *)p;
+ if (param->hContact == NULL || param->hContact == INVALID_CONTACT_ID || !IsOnline())
return;
- for (int i = 0; i < MAX_RETRIES && IsEmpty(ptrT(db_get_tsa(hContact, m_szModuleName, "Nick"))); i++) {
+ for (int i = 0; i < MAX_RETRIES && IsEmpty(ptrT(db_get_tsa(param->hContact, m_szModuleName, "Nick"))); i++) {
Sleep(1500);
if (!IsOnline())
return;
}
- DBAddAuthRequest(hContact);
+ DBAddAuthRequest(param->hContact, param->bAdded);
+ delete param;
}
-void CVkProto::DBAddAuthRequest(const MCONTACT hContact)
+void CVkProto::DBAddAuthRequest(const MCONTACT hContact, bool added)
{
debugLogA("CVkProto::DBAddAuthRequest");
@@ -524,7 +525,7 @@ void CVkProto::DBAddAuthRequest(const MCONTACT hContact)
dbei.szModule = m_szModuleName;
dbei.timestamp = (DWORD)time(NULL);
dbei.flags = DBEF_UTF;
- dbei.eventType = EVENTTYPE_AUTHREQUEST;
+ dbei.eventType = added ? EVENTTYPE_ADDED: EVENTTYPE_AUTHREQUEST;
dbei.cbBlob = (DWORD)(sizeof(DWORD) * 2 + mir_strlen(szNick) + mir_strlen(szFirstName) + mir_strlen(szLastName) + 5);
PBYTE pCurBlob = dbei.pBlob = (PBYTE)mir_alloc(dbei.cbBlob);