summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_captcha.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-12 11:59:23 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-12 11:59:23 +0000
commite528a508b7e307bd35b142b269a0bbd1b6813e89 (patch)
treee7e0a45738745420c563b141398e60d51558b46c /protocols/VKontakte/src/vk_captcha.cpp
parent484267e90233bcef4ed9bda249053f5657b3974d (diff)
VKontakte:
- completely rewritten schema of pushing requests; - typed http parameters insted of old strings git-svn-id: http://svn.miranda-ng.org/main/trunk@7613 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_captcha.cpp')
-rw-r--r--protocols/VKontakte/src/vk_captcha.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/protocols/VKontakte/src/vk_captcha.cpp b/protocols/VKontakte/src/vk_captcha.cpp
index 3196082882..527c5d6e49 100644
--- a/protocols/VKontakte/src/vk_captcha.cpp
+++ b/protocols/VKontakte/src/vk_captcha.cpp
@@ -106,7 +106,7 @@ bool CVkProto::RunCaptchaForm(LPCSTR szUrl, CMStringA &result)
NETLIBHTTPREQUEST req = { sizeof(req) };
req.requestType = REQUEST_GET;
req.szUrl = (LPSTR)szUrl;
- req.flags = NLHRF_NODUMPHEADERS;
+ req.flags = VK_NODUMPHEADERS;
NETLIBHTTPREQUEST *reply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)m_hNetlibUser, (LPARAM)&req);
if (reply == NULL)
@@ -152,9 +152,8 @@ bool CVkProto::ApplyCaptcha(AsyncHttpRequest *pReq, JSONNODE *pErrorNode)
if ( !RunCaptchaForm(szUrl, userReply))
return false;
- CMStringA szNewUrl = pReq->szUrl;
- szNewUrl.AppendFormat("&captcha_sid=%s&captcha_key=%s", szSid, userReply.GetString());
- replaceStr(pReq->szUrl, mir_strndup(szNewUrl, szNewUrl.GetLength()));
+ pReq->m_szUrl = pReq->szUrl;
+ pReq->m_szUrl.AppendFormat("&captcha_sid=%s&captcha_key=%s", szSid, userReply.GetString());
pReq->bNeedsRestart = true;
return true;
}