From 5e43bcf443914472db988b8e1dd84aedf70a7037 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Thu, 30 Apr 2015 09:27:37 +0000 Subject: minus critical section git-svn-id: http://svn.miranda-ng.org/main/trunk@13285 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HTTPServer/src/FileShareNode.cpp | 2 +- plugins/HTTPServer/src/FileShareNode.h | 5 ++--- plugins/HTTPServer/src/main.cpp | 1 - 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) { -- cgit v1.2.3