diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-03-22 19:41:47 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-03-22 19:41:47 +0000 |
commit | 4ba63fe41c45077e90e24f77bcece6af9ddeafef (patch) | |
tree | 484954e844e3017f3d49d0b9b7ff3dd033b86e5c /protocols/VKontakte/src/misc.cpp | |
parent | 47d47d91871187493974ee79c24fc1f03c7992fd (diff) |
VKontakte:
fix order for AsyncHttpRequest in m_arRequestsQueue
git-svn-id: http://svn.miranda-ng.org/main/trunk@12476 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 756f74e190..8d3a6c1295 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -144,6 +144,8 @@ char* ExpUrlEncode(const char *szUrl, bool strict) /////////////////////////////////////////////////////////////////////////////////////////
+ULONG AsyncHttpRequest::m_reqCount = 0;
+
AsyncHttpRequest::AsyncHttpRequest()
{
cbSize = sizeof(NETLIBHTTPREQUEST);
@@ -156,7 +158,7 @@ AsyncHttpRequest::AsyncHttpRequest() bIsMainConn = false;
m_pFunc = NULL;
bExpUrlEncode = false;
- m_time = time(NULL);
+ m_reqNum = ::InterlockedIncrement(&m_reqCount);
m_priority = rpLow;
}
@@ -188,7 +190,7 @@ AsyncHttpRequest::AsyncHttpRequest(CVkProto *ppro, int iRequestType, LPCSTR _url pUserInfo = NULL;
m_iRetry = MAX_RETRIES;
bNeedsRestart = false;
- m_time = time(NULL);
+ m_reqNum = ::InterlockedIncrement(&m_reqCount);
m_priority = rpPriority;
}
|