diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-26 17:05:53 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-26 17:05:53 +0000 |
commit | 648a01a82835a8b0dc9d831955fda6996fc00836 (patch) | |
tree | 441a00663489c7efecdade85a8cad411312c1f72 /protocols | |
parent | d861391bba345d01aeab43e3e7286d0d4a3a0f1a (diff) |
VK: processing of failed:2 in long poll requests
git-svn-id: http://svn.miranda-ng.org/main/trunk@6637 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index ec26804c2c..2b19032c5c 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -522,7 +522,13 @@ int CVkProto::PollServer() int retVal = 0;
if (reply->resultCode == 200) {
JSONROOT pRoot(reply->pData);
- if ( CheckJsonResult(NULL, reply, pRoot)) {
+ JSONNODE *pFailed = json_get(pRoot, "failed");
+ if (pFailed != NULL && json_as_int(pFailed) == 2) {
+ RetrievePollingInfo();
+ retVal = -1;
+ debugLogA("Polling key expired, restarting polling thread");
+ }
+ else if ( CheckJsonResult(NULL, reply, pRoot)) {
m_pollingTs = mir_t2a( ptrT( json_as_string( json_get(pRoot, "ts"))));
JSONNODE *pUpdates = json_get(pRoot, "updates");
if (pUpdates != NULL)
|