summaryrefslogtreecommitdiff
path: root/protocols/VKontakte
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2015-02-27 03:11:57 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2015-02-27 03:11:57 +0000
commit427c9ddf6b92e487f80b9856dbca6b71da5d8af7 (patch)
tree5ecd85fbc6f4f82c19776a8772e5f21adc4de203 /protocols/VKontakte
parent73ae04e46f095a0074588c49e430f46077457145 (diff)
VKontakte: fix restart connect process when network error on authorization
git-svn-id: http://svn.miranda-ng.org/main/trunk@12276 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r--protocols/VKontakte/src/vk_queue.cpp13
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp2
2 files changed, 10 insertions, 5 deletions
diff --git a/protocols/VKontakte/src/vk_queue.cpp b/protocols/VKontakte/src/vk_queue.cpp
index a022562d4e..64b9bc7c47 100644
--- a/protocols/VKontakte/src/vk_queue.cpp
+++ b/protocols/VKontakte/src/vk_queue.cpp
@@ -101,13 +101,16 @@ void CVkProto::WorkerThread(void*)
else {
// Initialize new OAuth session
extern char szBlankUrl[];
- Push(new AsyncHttpRequest(this, REQUEST_GET, "https://oauth.vk.com/authorize", false, &CVkProto::OnOAuthAuthorize)
- << INT_PARAM("client_id", VK_APP_ID)
+ AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_GET, "https://oauth.vk.com/authorize", false, &CVkProto::OnOAuthAuthorize)
+ << INT_PARAM("client_id", VK_APP_ID)
<< CHAR_PARAM("scope", "friends,photos,audio,docs,video,wall,messages,offline,status,notifications")
- << CHAR_PARAM("redirect_uri", szBlankUrl)
- << CHAR_PARAM("display", "mobile")
+ << CHAR_PARAM("redirect_uri", szBlankUrl)
+ << CHAR_PARAM("display", "mobile")
<< CHAR_PARAM("response_type", "token")
- << VER_API)->m_bApiReq = false;
+ << VER_API;
+ pReq->m_bApiReq = false;
+ pReq->bIsMainConn = true;
+ Push(pReq);
}
while (true) {
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index 99b9685001..306fda8600 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -147,6 +147,7 @@ void CVkProto::OnOAuthAuthorize(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq
m_prevUrl = pReq->m_szUrl;
}
pReq->m_bApiReq = false;
+ pReq->bIsMainConn = true;
Push(pReq);
}
}
@@ -189,6 +190,7 @@ void CVkProto::OnOAuthAuthorize(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq
pReq->Redirect(reply);
ApplyCookies(pReq);
pReq->m_bApiReq = false;
+ pReq->bIsMainConn = true;
Push(pReq);
}