diff options
author | George Hazan <george.hazan@gmail.com> | 2014-09-10 12:11:44 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-09-10 12:11:44 +0000 |
commit | f5988c0e4245176f9b3c4380265e70ac2344f62a (patch) | |
tree | 80bbdd797e671769549208e78326a7121ac54216 /protocols/VKontakte/src | |
parent | 3f414550504c0b467a26616df10010d2ccbfc8b2 (diff) |
more code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@10421 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src')
-rw-r--r-- | protocols/VKontakte/src/vk_proto.h | 4 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_queue.cpp | 16 |
2 files changed, 9 insertions, 11 deletions
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h index d1ff3aa750..60350ce5ab 100644 --- a/protocols/VKontakte/src/vk_proto.h +++ b/protocols/VKontakte/src/vk_proto.h @@ -239,11 +239,11 @@ private: friend struct AsyncHttpRequest;
LIST<AsyncHttpRequest> m_arRequestsQueue;
- CRITICAL_SECTION m_csRequestsQueue;
- CMStringA m_prevUrl;
+ mir_cs m_csRequestsQueue;
HANDLE m_evRequestsQueue;
HANDLE m_hWorkerThread;
bool m_bTerminated, m_bServerDelivery;
+ CMStringA m_prevUrl;
struct Cookie
{
diff --git a/protocols/VKontakte/src/vk_queue.cpp b/protocols/VKontakte/src/vk_queue.cpp index 82fece41cc..bb506bd0ce 100644 --- a/protocols/VKontakte/src/vk_queue.cpp +++ b/protocols/VKontakte/src/vk_queue.cpp @@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. void CVkProto::InitQueue()
{
- ::InitializeCriticalSection(&m_csRequestsQueue);
m_evRequestsQueue = CreateEvent(NULL, FALSE, FALSE, NULL);
}
@@ -27,7 +26,6 @@ void CVkProto::UninitQueue() {
m_arRequestsQueue.destroy();
CloseHandle(m_evRequestsQueue);
- ::DeleteCriticalSection(&m_csRequestsQueue);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -37,13 +35,13 @@ void CVkProto::ExecuteRequest(AsyncHttpRequest *pReq) CMStringA str;
LBL_Restart:
- if (pReq->requestType == REQUEST_GET) {
- str.Format("%s?%s", pReq->m_szUrl, pReq->m_szParam);
- pReq->szUrl = str.GetBuffer();
- }
- else {
- pReq->szUrl = pReq->m_szUrl.GetBuffer();
- if (!pReq->m_szParam.IsEmpty()) {
+ pReq->szUrl = pReq->m_szUrl.GetBuffer();
+ if (!pReq->m_szParam.IsEmpty()) {
+ if (pReq->requestType == REQUEST_GET) {
+ str.Format("%s?%s", pReq->m_szUrl, pReq->m_szParam);
+ pReq->szUrl = str.GetBuffer();
+ }
+ else {
pReq->pData = mir_strdup(pReq->m_szParam.GetBuffer());
pReq->dataLength = pReq->m_szParam.GetLength();
}
|