summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_queue.cpp
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2014-09-15 03:43:29 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2014-09-15 03:43:29 +0000
commit3f85b15bfb0f49b3ecc2da23060f4a2d6d3ad372 (patch)
treea547731ccb529ad21f483d2e9c9ca2f61c82443b /protocols/VKontakte/src/vk_queue.cpp
parentc88a84620596987aeb21e55b4eb3d71a4bf4d5d1 (diff)
VKontakte:
upgrade vk api version to 5.24 - complete bugfix for StatusMsg freeze acceleration avatars loading some cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@10448 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_queue.cpp')
-rw-r--r--protocols/VKontakte/src/vk_queue.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/protocols/VKontakte/src/vk_queue.cpp b/protocols/VKontakte/src/vk_queue.cpp
index c1934fa190..b736fad51a 100644
--- a/protocols/VKontakte/src/vk_queue.cpp
+++ b/protocols/VKontakte/src/vk_queue.cpp
@@ -91,10 +91,13 @@ void CVkProto::WorkerThread(void*)
else {
// Initialize new OAuth session
extern char szBlankUrl[];
- //need rework
Push(new AsyncHttpRequest(this, REQUEST_GET, "/oauth/authorize", false, &CVkProto::OnOAuthAuthorize)
- << INT_PARAM("client_id", VK_APP_ID) << CHAR_PARAM("scope", "friends,photos,audio,video,wall,messages,offline")
- << CHAR_PARAM("redirect_uri", szBlankUrl) << CHAR_PARAM("display", "wap") << CHAR_PARAM("response_type", "token"));
+ << INT_PARAM("client_id", VK_APP_ID)
+ << CHAR_PARAM("scope", "friends,photos,audio,video,wall,messages,offline,status")
+ << CHAR_PARAM("redirect_uri", szBlankUrl)
+ << CHAR_PARAM("display", "mobile")
+ << CHAR_PARAM("response_type", "token")
+ << VER_API)->m_bApiReq = false;;
}
while(true) {
@@ -112,7 +115,7 @@ void CVkProto::WorkerThread(void*)
pReq = m_arRequestsQueue[0];
m_arRequestsQueue.remove(0);
- need_sleep = (m_arRequestsQueue.getCount() > 1); // more than two to not gather
+ need_sleep = (m_arRequestsQueue.getCount() > 1) && (pReq->m_bApiReq); // more than two to not gather
}
ExecuteRequest(pReq);
if (need_sleep) // There can be maximum 3 requests to API methods per second from a client