summaryrefslogtreecommitdiff
path: root/plugins/HTTPServer
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/HTTPServer')
-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) {