summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_search.cpp
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2014-10-21 08:08:45 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2014-10-21 08:08:45 +0000
commit537cc1ec9cdd43257b19385acacd05cdace3ac1a (patch)
treeb593f58dc1bd0da4d0bb3ef0218aa726955727eb /protocols/VKontakte/src/vk_search.cpp
parentf28932a9312ce067782665b9497f8203483d748d (diff)
VKontakte:
add IsOnline() in functions with pushing requests fix(?) for freeze offline status git-svn-id: http://svn.miranda-ng.org/main/trunk@10843 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_search.cpp')
-rw-r--r--protocols/VKontakte/src/vk_search.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/vk_search.cpp b/protocols/VKontakte/src/vk_search.cpp
index 7c3c86ad6d..2acfaedd1e 100644
--- a/protocols/VKontakte/src/vk_search.cpp
+++ b/protocols/VKontakte/src/vk_search.cpp
@@ -48,6 +48,8 @@ HANDLE CVkProto::SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName,
void CVkProto::SearchBasicThread(void* id)
{
debugLogA("CVkProto::OnSearchBasicThread");
+ if (!IsOnline())
+ return;
AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_GET, "/method/users.get.json", true, &CVkProto::OnSearch)
<< TCHAR_PARAM("user_ids", (TCHAR *)id)
<< CHAR_PARAM("fields", "nickname, domain")
@@ -59,6 +61,8 @@ void CVkProto::SearchBasicThread(void* id)
void CVkProto::SearchByMailThread(void* email)
{
debugLogA("CVkProto::OnSearchBasicThread");
+ if (!IsOnline())
+ return;
AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_GET, "/method/account.lookupContacts.json", true, &CVkProto::OnSearchByMail)
<< TCHAR_PARAM("contacts", (TCHAR *)email)
<< CHAR_PARAM("service", "email")
@@ -73,6 +77,8 @@ void __cdecl CVkProto::SearchThread(void* p)
TCHAR arg[200];
mir_sntprintf(arg, SIZEOF(arg), _T("%s %s %s"), pParam->pszFirstName, pParam->pszNick, pParam->pszLastName);
debugLog(_T("CVkProto::SearchThread %s"), arg);
+ if (!IsOnline())
+ return;
AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_GET, "/method/users.search.json", true, &CVkProto::OnSearch)
<< TCHAR_PARAM("q", (TCHAR *)arg)