summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}