diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-11 11:32:39 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-11 11:32:39 +0000 |
commit | fe7e3a6032bf680998da291616f39c679920f481 (patch) | |
tree | 8f1750921896e7f0679ff1a338d1358c7f541d5f /protocols/Xfire/src/Xfire_avatar_loader.cpp | |
parent | b86e3b7cd68112b06c2a54be9fb262d45a65833a (diff) |
minus critical section
git-svn-id: http://svn.miranda-ng.org/main/trunk@13525 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Xfire/src/Xfire_avatar_loader.cpp')
-rw-r--r-- | protocols/Xfire/src/Xfire_avatar_loader.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/protocols/Xfire/src/Xfire_avatar_loader.cpp b/protocols/Xfire/src/Xfire_avatar_loader.cpp index 4ace311827..92a84ef978 100644 --- a/protocols/Xfire/src/Xfire_avatar_loader.cpp +++ b/protocols/Xfire/src/Xfire_avatar_loader.cpp @@ -4,17 +4,11 @@ Xfire_avatar_loader::Xfire_avatar_loader(xfirelib::Client* client) { threadrunning = FALSE; this->client = client; - InitializeCriticalSection(&this->avatarMutex); } Xfire_avatar_loader::~Xfire_avatar_loader() { //liste leeren, damit der laufende thread abgebrochen wird list.clear(); - //warten bis der thread geschlossen wurde - EnterCriticalSection(&this->avatarMutex); - LeaveCriticalSection(&this->avatarMutex); - //critical section entfernen - DeleteCriticalSection(&this->avatarMutex); } void Xfire_avatar_loader::loadThread(void *arg) { @@ -24,7 +18,7 @@ void Xfire_avatar_loader::loadThread(void *arg) { if (!loader) return; - EnterCriticalSection(&loader->avatarMutex); + mir_cslock lck(loader->avatarMutex); loader->threadrunning = TRUE; while (1){ @@ -56,7 +50,6 @@ void Xfire_avatar_loader::loadThread(void *arg) { } loader->threadrunning = FALSE; - LeaveCriticalSection(&loader->avatarMutex); return; } |