From 728f3b62ed973a920490111b692ecf0e365243a7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 14 Dec 2014 12:25:16 +0000 Subject: most evident warnings in MRA fixed git-svn-id: http://svn.miranda-ng.org/main/trunk@11398 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MRA/src/MraSendQueue.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'protocols/MRA/src/MraSendQueue.cpp') diff --git a/protocols/MRA/src/MraSendQueue.cpp b/protocols/MRA/src/MraSendQueue.cpp index 41a90c55bc..4e17b3a4f0 100644 --- a/protocols/MRA/src/MraSendQueue.cpp +++ b/protocols/MRA/src/MraSendQueue.cpp @@ -31,7 +31,7 @@ DWORD MraSendQueueInitialize(DWORD dwSendTimeOutInterval, HANDLE *phSendQueueHan if (!pmrasqSendQueue) return GetLastError(); - DWORD dwRetErrorCode = ListMTInitialize(pmrasqSendQueue, 0); + DWORD dwRetErrorCode = ListMTInitialize(pmrasqSendQueue); if (dwRetErrorCode == NO_ERROR) { pmrasqSendQueue->dwSendTimeOutInterval = dwSendTimeOutInterval; *phSendQueueHandle = (HANDLE)pmrasqSendQueue; @@ -47,7 +47,7 @@ void MraSendQueueDestroy(HANDLE hSendQueueHandle) MRA_SEND_QUEUE *pmrasqSendQueue = (MRA_SEND_QUEUE*)hSendQueueHandle; MRA_SEND_QUEUE_ITEM *pmrasqiSendQueueItem; { - mt_lock l(pmrasqSendQueue); + mir_cslock l(pmrasqSendQueue->cs); while ( !ListMTItemGetFirst(pmrasqSendQueue, NULL, (LPVOID*)&pmrasqiSendQueueItem)) { ListMTItemDelete(pmrasqSendQueue, pmrasqiSendQueueItem); mir_free(pmrasqiSendQueueItem); @@ -79,7 +79,7 @@ DWORD MraSendQueueAdd(HANDLE hSendQueueHandle, DWORD dwCMDNum, DWORD dwFlags, MC pmrasqiSendQueueItem->lpbData = lpbData; pmrasqiSendQueueItem->dwDataSize = dwDataSize; - mt_lock l(pmrasqSendQueue); + mir_cslock l(pmrasqSendQueue->cs); ListMTItemAdd(pmrasqSendQueue, pmrasqiSendQueueItem, pmrasqiSendQueueItem); return 0; } @@ -93,7 +93,7 @@ DWORD MraSendQueueFree(HANDLE hSendQueueHandle, DWORD dwCMDNum) MRA_SEND_QUEUE_ITEM *pmrasqiSendQueueItem; LIST_MT_ITERATOR lmtiIterator; - mt_lock l(pmrasqSendQueue); + mir_cslock l(pmrasqSendQueue->cs); ListMTIteratorMoveFirst(pmrasqSendQueue, &lmtiIterator); do { if ( !ListMTIteratorGet(&lmtiIterator, NULL, (LPVOID*)&pmrasqiSendQueueItem)) @@ -117,7 +117,7 @@ DWORD MraSendQueueFind(HANDLE hSendQueueHandle, DWORD dwCMDNum, DWORD *pdwFlags, MRA_SEND_QUEUE_ITEM *pmrasqiSendQueueItem; LIST_MT_ITERATOR lmtiIterator; - mt_lock l(pmrasqSendQueue); + mir_cslock l(pmrasqSendQueue->cs); ListMTIteratorMoveFirst(pmrasqSendQueue, &lmtiIterator); do { if ( !ListMTIteratorGet(&lmtiIterator, NULL, (LPVOID*)&pmrasqiSendQueueItem)) @@ -145,7 +145,7 @@ DWORD MraSendQueueFindOlderThan(HANDLE hSendQueueHandle, DWORD dwTime, DWORD *pd (*((DWORDLONG*)&ftExpireTime))-=((DWORDLONG)dwTime*FILETIME_SECOND); MRA_SEND_QUEUE *pmrasqSendQueue = (MRA_SEND_QUEUE*)hSendQueueHandle; - mt_lock l(pmrasqSendQueue); + mir_cslock l(pmrasqSendQueue->cs); LIST_MT_ITERATOR lmtiIterator; ListMTIteratorMoveFirst(pmrasqSendQueue, &lmtiIterator); -- cgit v1.2.3