From 80b38ee72965c7f25d6397eb9b9a2c35ca9b4b72 Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Tue, 16 Sep 2014 02:16:12 +0000 Subject: =?UTF-8?q?VKontakte:=20add=20restart=20for=20=E2=80=98error=206?= =?UTF-8?q?=E2=80=99=20request=20cosmetic=20change=20for=20OnReceiveSmth?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.miranda-ng.org/main/trunk@10464 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/misc.cpp | 6 ++++-- 1 file 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)); } -- cgit v1.2.3