diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-21 08:08:45 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-21 08:08:45 +0000 |
commit | 537cc1ec9cdd43257b19385acacd05cdace3ac1a (patch) | |
tree | b593f58dc1bd0da4d0bb3ef0218aa726955727eb /protocols/VKontakte/src/vk_captcha.cpp | |
parent | f28932a9312ce067782665b9497f8203483d748d (diff) |
VKontakte:
add IsOnline() in functions with pushing requests
fix(?) for freeze offline status
git-svn-id: http://svn.miranda-ng.org/main/trunk@10843 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_captcha.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_captcha.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/vk_captcha.cpp b/protocols/VKontakte/src/vk_captcha.cpp index 715e36761f..cd5a9eab89 100644 --- a/protocols/VKontakte/src/vk_captcha.cpp +++ b/protocols/VKontakte/src/vk_captcha.cpp @@ -103,6 +103,8 @@ bool CVkProto::RunCaptchaForm(LPCSTR szUrl, CMStringA &result) debugLogA("CVkProto::RunCaptchaForm: reading picture from %s", szUrl);
result.Empty();
+ if (!IsOnline())
+ return false;
NETLIBHTTPREQUEST req = { sizeof(req) };
req.requestType = REQUEST_GET;
req.szUrl = (LPSTR)szUrl;
@@ -144,6 +146,9 @@ bool CVkProto::RunCaptchaForm(LPCSTR szUrl, CMStringA &result) bool CVkProto::ApplyCaptcha(AsyncHttpRequest *pReq, JSONNODE *pErrorNode)
{
debugLogA("CVkProto::ApplyCaptcha");
+ if (!IsOnline())
+ return false;
+
char *szUrl = NEWSTR_ALLOCA( _T2A( json_as_string( json_get(pErrorNode, "captcha_img"))));
char *szSid = NEWSTR_ALLOCA( _T2A( json_as_string( json_get(pErrorNode, "captcha_sid"))));
if (szUrl == NULL || szSid == NULL)
|