summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_queue.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-10-07 20:33:20 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-10-07 20:33:20 +0000
commitd91b68566522230f4daff25c8c2376fbd99ca640 (patch)
tree8c773a1a44d32ca06f9f0b2c8c7c7d00e57ab5bd /protocols/VKontakte/src/vk_queue.cpp
parenteeb8b2901b9a58285929071cac255d8bb565a2f7 (diff)
VK: avatars
git-svn-id: http://svn.miranda-ng.org/main/trunk@6401 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_queue.cpp')
-rw-r--r--protocols/VKontakte/src/vk_queue.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/VKontakte/src/vk_queue.cpp b/protocols/VKontakte/src/vk_queue.cpp
index 47a146ffa9..e81bc61b0c 100644
--- a/protocols/VKontakte/src/vk_queue.cpp
+++ b/protocols/VKontakte/src/vk_queue.cpp
@@ -52,7 +52,8 @@ void CVkProto::ExecuteRequest(AsyncHttpRequest *pReq)
{
NETLIBHTTPREQUEST *reply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)m_hNetlibUser, (LPARAM)pReq);
if (reply != NULL) {
- (this->*(pReq->m_pFunc))(reply);
+ if (pReq->m_pFunc != NULL)
+ (this->*(pReq->m_pFunc))(reply, pReq->pUserInfo);
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)reply);
}
delete pReq;
@@ -80,6 +81,7 @@ bool CVkProto::PushAsyncHttpRequest(int iRequestType, LPCSTR szUrl, bool bSecure
url.AppendChar('=');
url += ptrA( mir_urlEncode(pParams[i].szValue));
}
+ pReq->nlc = m_hNetlibConn;
}
else {
url = szUrl;
@@ -94,8 +96,7 @@ bool CVkProto::PushAsyncHttpRequest(int iRequestType, LPCSTR szUrl, bool bSecure
bool CVkProto::PushAsyncHttpRequest(AsyncHttpRequest *pReq, int iTimeout)
{
- pReq->nlc = m_hNetlibConn;
- pReq->m_expireTime = time(0) + iTimeout;
+ pReq->timeout = iTimeout;
{
mir_cslock lck(m_csRequestsQueue);
m_arRequestsQueue.insert(pReq);