summaryrefslogtreecommitdiff
path: root/src/modules/netlib
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-07-13 10:50:59 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-07-13 10:50:59 +0000
commit5df94ff719eccd04c7450df35fb5e3f2b36e2ee7 (patch)
tree440d736b199ff849ca0619adf355ffc73750ca7f /src/modules/netlib
parent70496fb739225b559a251f4518c946110aef718c (diff)
wrapping the most evident critical sections into a class
git-svn-id: http://svn.miranda-ng.org/main/trunk@9785 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/netlib')
-rw-r--r--src/modules/netlib/netlib.cpp4
-rw-r--r--src/modules/netlib/netlib.h2
-rw-r--r--src/modules/netlib/netlibopenconn.cpp2
3 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/netlib/netlib.cpp b/src/modules/netlib/netlib.cpp
index 47e3b13763..64c42a575a 100644
--- a/src/modules/netlib/netlib.cpp
+++ b/src/modules/netlib/netlib.cpp
@@ -40,7 +40,7 @@ static int CompareNetlibUser(const NetlibUser* p1, const NetlibUser* p2)
}
LIST<NetlibUser> netlibUser(5, CompareNetlibUser);
-CRITICAL_SECTION csNetlibUser;
+mir_cs csNetlibUser;
SSL_API si;
@@ -426,7 +426,6 @@ void UnloadNetlibModule(void)
CloseHandle(hConnectionHeaderMutex);
if (hConnectionOpenMutex)
CloseHandle(hConnectionOpenMutex);
- DeleteCriticalSection(&csNetlibUser);
WSACleanup();
}
@@ -440,7 +439,6 @@ int LoadNetlibModule(void)
HookEvent(ME_OPT_INITIALISE, NetlibOptInitialise);
- InitializeCriticalSection(&csNetlibUser);
hConnectionHeaderMutex = CreateMutex(NULL, FALSE, NULL);
NetlibLogInit();
diff --git a/src/modules/netlib/netlib.h b/src/modules/netlib/netlib.h
index fa887e91a3..1312b5208a 100644
--- a/src/modules/netlib/netlib.h
+++ b/src/modules/netlib/netlib.h
@@ -120,7 +120,7 @@ INT_PTR NetlibBase64Encode(WPARAM wParam, LPARAM lParam);
INT_PTR NetlibBase64Decode(WPARAM wParam, LPARAM lParam);
INT_PTR NetlibHttpUrlEncode(WPARAM wParam, LPARAM lParam);
-extern CRITICAL_SECTION csNetlibUser;
+extern mir_cs csNetlibUser;
extern LIST<NetlibUser> netlibUser;
//netlibautoproxy.c
diff --git a/src/modules/netlib/netlibopenconn.cpp b/src/modules/netlib/netlibopenconn.cpp
index ba0269065c..07b96903e6 100644
--- a/src/modules/netlib/netlibopenconn.cpp
+++ b/src/modules/netlib/netlibopenconn.cpp
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "..\..\core\commonheaders.h"
#include "netlib.h"
-extern CRITICAL_SECTION csNetlibUser;
+extern mir_cs csNetlibUser;
extern HANDLE hConnectionOpenMutex;
extern DWORD g_LastConnectionTick;
extern int connectionTimeout;