diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-30 09:23:36 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-30 09:23:36 +0000 |
commit | 70551c0b0af18604fbf3e934f468c5c0df7cf66f (patch) | |
tree | 8df77b73235bc7f59a9a84f3a22ca3893ad3c0e2 /plugins/LotusNotify | |
parent | 34d561d1468bfd0a380d755d6c991ec1b7ed79cf (diff) |
minus critical section
git-svn-id: http://svn.miranda-ng.org/main/trunk@13284 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/LotusNotify')
-rw-r--r-- | plugins/LotusNotify/src/LotusNotify.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp index 9526c144f7..7c0b9f5e69 100644 --- a/plugins/LotusNotify/src/LotusNotify.cpp +++ b/plugins/LotusNotify/src/LotusNotify.cpp @@ -28,7 +28,7 @@ HINSTANCE hLotusDll; HEMREGISTRATION hLotusRegister = 0;
boolean volatile Plugin_Terminated = false;
-CRITICAL_SECTION checkthreadCS;
+mir_cs checkthreadCS;
HANDLE hMenuService = NULL;
HGENMENU hMenuHandle = NULL;
@@ -605,7 +605,7 @@ void checkthread(void*) WCHAR field_to_UNICODE[MAX_FIELD];
WCHAR field_copy_UNICODE[MAX_FIELD];
- EnterCriticalSection(&checkthreadCS);
+ mir_cslock lck(checkthreadCS);
log(L"checkthread: inside new check thread");
if (error = (NotesInitThread1)()) {
@@ -832,7 +832,6 @@ void checkthread(void*) if(currentStatus != ID_STATUS_OFFLINE){
LNEnableMenuItem(hMenuHandle, !running);
}
- LeaveCriticalSection(&checkthreadCS);
return;
errorblock0:
@@ -846,7 +845,6 @@ errorblock: //LNEnableMenuItem(hMenuHandle,!running);
//SetStatus(ID_STATUS_OFFLINE,0);
running = FALSE;
- LeaveCriticalSection(&checkthreadCS);
return;
}
@@ -1574,7 +1572,6 @@ extern "C" int __declspec(dllexport) Load(void) {
mir_getLP(&pluginInfo);
Plugin_Terminated = false;
- InitializeCriticalSection(&checkthreadCS);
//if(pluginLink)//strange, but this function is called by Lotus API Extension Manager (instead of MainEntryPoint) probably always with parameter poiter =1
if(bMirandaCall){
@@ -1662,9 +1659,7 @@ extern "C" int __declspec(dllexport) Unload() log(L"Unload: start");
Plugin_Terminated = true;
- EnterCriticalSection(&checkthreadCS);
- LeaveCriticalSection(&checkthreadCS);
- DeleteCriticalSection(&checkthreadCS);
+ mir_cslock lck(checkthreadCS);
if (hMenuService) DestroyServiceFunction(hMenuService);
if (hCheckEvent) DestroyHookableEvent(hCheckEvent);
|