summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/VKontakte/src/misc.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 0d91df22d4..b312bdd9ae 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -393,19 +393,21 @@ bool CVkProto::CheckJsonResult(AsyncHttpRequest *pReq, const JSONNode &jnNode)
MsgPopup(TranslateT("Access denied! Data will not be sent or received."), TranslateT("Error"), true);
break;
case VKERR_CAPTCHA_NEEDED:
- if (!ApplyCaptcha(pReq, jnError) && (pReq->m_iRetry > 0)) {
- pReq->bNeedsRestart = true;
- Sleep(1000);
- debugLogA("CVkProto::CheckJsonResult Captcha processing error.");
- debugLogA("CVkProto::CheckJsonResult Retry = %d", pReq->m_iRetry);
- pReq->m_iRetry--;
- } else {
- CMStringW wszMsg(FORMAT, TranslateT("Error %d. Data will not be sent or received."), iErrorCode);
- wszMsg += "\n";
- wszMsg += TranslateT("Captcha processing error.");
- MsgPopup(wszMsg, TranslateT("Error"), true);
- debugLogA("CVkProto::CheckJsonResult SendError");
- }
+ if (!ApplyCaptcha(pReq, jnError))
+ if(pReq->m_iRetry > 0) {
+ pReq->bNeedsRestart = true;
+ Sleep(1000);
+ debugLogA("CVkProto::CheckJsonResult Captcha processing error.");
+ debugLogA("CVkProto::CheckJsonResult Retry = %d", pReq->m_iRetry);
+ pReq->m_iRetry--;
+ }
+ else {
+ CMStringW wszMsg(FORMAT, TranslateT("Error %d. Data will not be sent or received."), iErrorCode);
+ wszMsg += "\n";
+ wszMsg += TranslateT("Captcha processing error.");
+ MsgPopup(wszMsg, TranslateT("Error"), true);
+ debugLogA("CVkProto::CheckJsonResult SendError");
+ }
break;
case VKERR_VALIDATION_REQUIRED: // Validation Required