summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-04-30 09:27:37 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-04-30 09:27:37 +0000
commit5e43bcf443914472db988b8e1dd84aedf70a7037 (patch)
tree12b0e36356bd3c5cd490485cde41dc2be6265da5
parent70551c0b0af18604fbf3e934f468c5c0df7cf66f (diff)
minus critical section
git-svn-id: http://svn.miranda-ng.org/main/trunk@13285 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/HTTPServer/src/FileShareNode.cpp2
-rw-r--r--plugins/HTTPServer/src/FileShareNode.h5
-rw-r--r--plugins/HTTPServer/src/main.cpp1
3 files changed, 3 insertions, 5 deletions
diff --git a/plugins/HTTPServer/src/FileShareNode.cpp b/plugins/HTTPServer/src/FileShareNode.cpp
index a5b57ecc14..5751dd60e2 100644
--- a/plugins/HTTPServer/src/FileShareNode.cpp
+++ b/plugins/HTTPServer/src/FileShareNode.cpp
@@ -19,7 +19,7 @@
#include "Glob.h"
CLFileShareNode * pclFirstNode = NULL;
-CRITICAL_SECTION csFileShareListAccess;
+mir_cs csFileShareListAccess;
diff --git a/plugins/HTTPServer/src/FileShareNode.h b/plugins/HTTPServer/src/FileShareNode.h
index 706a31f093..bea6bf9d49 100644
--- a/plugins/HTTPServer/src/FileShareNode.h
+++ b/plugins/HTTPServer/src/FileShareNode.h
@@ -73,7 +73,7 @@ private:
};
extern CLFileShareNode * pclFirstNode;
-extern CRITICAL_SECTION csFileShareListAccess;
+extern mir_cs csFileShareListAccess;
class CLFileShareListAccess {
bool bLocked;
@@ -88,13 +88,12 @@ public:
void Lock() {
if (bLocked)
return;
- EnterCriticalSection(&csFileShareListAccess);
+ mir_cslock lck(csFileShareListAccess);
bLocked = true;
}
void Unlock() {
if (!bLocked)
return;
- LeaveCriticalSection(&csFileShareListAccess);
bLocked = false;
}
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp
index 89b61986c6..361aedcbb8 100644
--- a/plugins/HTTPServer/src/main.cpp
+++ b/plugins/HTTPServer/src/main.cpp
@@ -857,7 +857,6 @@ int nSystemShutdown(WPARAM /*wparam*/, LPARAM /*lparam*/) {
extern "C" __declspec(dllexport) int Load() {
mir_getLP(&pluginInfo);
- InitializeCriticalSection(&csFileShareListAccess);
hHttpAcceptConnectionsService = CreateServiceFunction(MS_HTTP_ACCEPT_CONNECTIONS, nToggelAcceptConnections);
if (! hHttpAcceptConnectionsService) {