summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/misc.cpp
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2014-09-16 02:16:12 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2014-09-16 02:16:12 +0000
commit80b38ee72965c7f25d6397eb9b9a2c35ca9b4b72 (patch)
treef8e27148f8f452e3321086b89f93c808de168251 /protocols/VKontakte/src/misc.cpp
parenta334be2979f9c7fc7b8d63ebb4c0f74b72cbfa92 (diff)
VKontakte:
add restart for ‘error 6’ request cosmetic change for OnReceiveSmth git-svn-id: http://svn.miranda-ng.org/main/trunk@10464 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r--protocols/VKontakte/src/misc.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 48375b0280..c9a36f42d6 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -100,14 +100,16 @@ bool CVkProto::CheckJsonResult(AsyncHttpRequest *pReq, NETLIBHTTPREQUEST *reply,
ConnectionFailed(LOGINERR_WRONGPASSWORD);
else if (iErrorCode == 14) // captcha
ApplyCaptcha(pReq, pError);
+ else if (iErrorCode == 6) // Too many requests per second
+ pReq->bNeedsRestart = true;
return iErrorCode == 0;
}
void CVkProto::OnReceiveSmth(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
{
JSONROOT pRoot;
- JSONNODE *Resp = CheckJsonResponse(pReq, reply, pRoot);
- debugLogA("CVkProto::OnReceiveSmth %s", json_as_string(Resp));
+ JSONNODE *pResponse = CheckJsonResponse(pReq, reply, pRoot);
+ debugLogA("CVkProto::OnReceiveSmth %s", json_as_string(pResponse));
}