diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-29 15:45:02 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-29 15:45:02 +0000 |
commit | aff7ba10e6572a394b47f160674bcdee7d32e13b (patch) | |
tree | a9395216828fcc3d02932a81883ae8484d27a7c6 /protocols/Steam/src | |
parent | 157801507625921ba1e39988fe54e27a9157daa4 (diff) |
minus critical section
git-svn-id: http://svn.miranda-ng.org/main/trunk@13243 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src')
-rw-r--r-- | protocols/Steam/src/steam_contacts.cpp | 4 | ||||
-rw-r--r-- | protocols/Steam/src/steam_proto.cpp | 6 | ||||
-rw-r--r-- | protocols/Steam/src/steam_proto.h | 6 | ||||
-rw-r--r-- | protocols/Steam/src/steam_queue.cpp | 2 |
4 files changed, 4 insertions, 14 deletions
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index e3c08b103c..8fca50265a 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -82,7 +82,7 @@ MCONTACT CSteamProto::FindContact(const char *steamId) { MCONTACT hContact = NULL; - EnterCriticalSection(&this->contact_search_lock); + mir_cslock lck(this->contact_search_lock); for (hContact = db_find_first(this->m_szModuleName); hContact; hContact = db_find_next(hContact, this->m_szModuleName)) { @@ -91,8 +91,6 @@ MCONTACT CSteamProto::FindContact(const char *steamId) break; } - LeaveCriticalSection(&this->contact_search_lock); - return hContact; } diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index d096beeac6..d144abd8f5 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -8,9 +8,6 @@ CSteamProto::CSteamProto(const char* protoName, const TCHAR* userName) : { CreateProtoService(PS_CREATEACCMGRUI, &CSteamProto::OnAccountManagerInit); - InitializeCriticalSection(&this->contact_search_lock); - InitializeCriticalSection(&this->set_status_lock); - InitQueue(); m_idleTS = 0; @@ -72,9 +69,6 @@ CSteamProto::CSteamProto(const char* protoName, const TCHAR* userName) : CSteamProto::~CSteamProto() { UninitQueue(); - - DeleteCriticalSection(&this->contact_search_lock); - DeleteCriticalSection(&this->set_status_lock); } MCONTACT __cdecl CSteamProto::AddToList(int flags, PROTOSEARCHRESULT* psr) diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h index bcddfdb6b3..6487a4ed9f 100644 --- a/protocols/Steam/src/steam_proto.h +++ b/protocols/Steam/src/steam_proto.h @@ -150,9 +150,9 @@ protected: HANDLE m_pollingConnection, m_hPollingThread;
ULONG hAuthProcess;
ULONG hMessageProcess;
- CRITICAL_SECTION contact_search_lock;
- CRITICAL_SECTION requests_queue_lock;
- CRITICAL_SECTION set_status_lock;
+ mir_cs contact_search_lock;
+ mir_cs requests_queue_lock;
+ mir_cs set_status_lock;
LIST<QueueItem> requestsQueue;
// instances
diff --git a/protocols/Steam/src/steam_queue.cpp b/protocols/Steam/src/steam_queue.cpp index 6fe3f32f84..d0bd54ad61 100644 --- a/protocols/Steam/src/steam_queue.cpp +++ b/protocols/Steam/src/steam_queue.cpp @@ -4,7 +4,6 @@ void CSteamProto::InitQueue() {
debugLogA("%s: entering", __FUNCTION__);
- InitializeCriticalSection(&requests_queue_lock);
m_evRequestsQueue = CreateEvent(NULL, FALSE, FALSE, NULL);
debugLogA("%s: leaving", __FUNCTION__);
@@ -16,7 +15,6 @@ void CSteamProto::UninitQueue() requestsQueue.destroy();
CloseHandle(m_evRequestsQueue);
- DeleteCriticalSection(&requests_queue_lock);
debugLogA("%s: leaving", __FUNCTION__);
}
|