summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_queue.cpp
diff options
context:
space:
mode:
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);