From 537cc1ec9cdd43257b19385acacd05cdace3ac1a Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Tue, 21 Oct 2014 08:08:45 +0000 Subject: 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 --- protocols/VKontakte/src/vk_search.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'protocols/VKontakte/src/vk_search.cpp') 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) -- cgit v1.2.3