summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_queue.cpp
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2016-04-04 06:54:11 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2016-04-04 06:54:11 +0000
commite6dce54eeeedb43855b694c921b97c5119deef32 (patch)
treeeba999ca35664fa0cb44e5d474e23682f5b05ba6 /protocols/VKontakte/src/vk_queue.cpp
parentc3d5068e1d3f07a0959aaa366fee11a552245c1a (diff)
VKontakte:
add VKlang to options remove unused title icon cosmetic fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@16582 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_queue.cpp')
-rw-r--r--protocols/VKontakte/src/vk_queue.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/VKontakte/src/vk_queue.cpp b/protocols/VKontakte/src/vk_queue.cpp
index 2f969937fc..a89f69ced3 100644
--- a/protocols/VKontakte/src/vk_queue.cpp
+++ b/protocols/VKontakte/src/vk_queue.cpp
@@ -81,7 +81,7 @@ void CVkProto::ExecuteRequest(AsyncHttpRequest *pReq)
}
debugLogA("CVkProto::ExecuteRequest pReq->bNeedsRestart = %d", (int)pReq->bNeedsRestart);
- if (!reply)
+ if (!reply && pReq->m_bApiReq)
m_hAPIConnection = NULL;
} while (pReq->bNeedsRestart && !m_bTerminated);
@@ -94,11 +94,12 @@ AsyncHttpRequest* CVkProto::Push(AsyncHttpRequest *pReq, int iTimeout)
{
debugLogA("CVkProto::Push");
pReq->timeout = iTimeout;
- if (pReq->m_bApiReq)
- {
- if (m_VKLang != nullptr) pReq << TCHAR_PARAM("lang", m_VKLang);
+ if (pReq->m_bApiReq) {
pReq << VER_API;
+ if (!IsEmpty(m_VKLang))
+ pReq << TCHAR_PARAM("lang", m_VKLang);
}
+
{
mir_cslock lck(m_csRequestsQueue);
m_arRequestsQueue.insert(pReq);
@@ -124,7 +125,6 @@ void CVkProto::WorkerThread(void*)
m_szAccessToken = NULL;
}
-
if (m_szAccessToken != NULL)
// try to receive a response from server
RetrieveMyInfo();