summaryrefslogtreecommitdiff
path: root/plugins/YAMN/src/protoplugin.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-02-19 12:05:55 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-02-19 12:05:55 +0000
commit5b796cb19202cbd63634ff68bda89520a5efc0c3 (patch)
treed06195813c1c422bea0c673e6e58f098b2d739eb /plugins/YAMN/src/protoplugin.cpp
parenta886e1caf3d3d563b43aaa230144b3e8f40a3d4e (diff)
YAMN:
- incorrect Unicode processing fixed; - critical sections removed; - translation fix; - code cleaning; git-svn-id: http://svn.miranda-ng.org/main/trunk@16308 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YAMN/src/protoplugin.cpp')
-rw-r--r--plugins/YAMN/src/protoplugin.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/plugins/YAMN/src/protoplugin.cpp b/plugins/YAMN/src/protoplugin.cpp
index dcede55d82..485286c4ea 100644
--- a/plugins/YAMN/src/protoplugin.cpp
+++ b/plugins/YAMN/src/protoplugin.cpp
@@ -93,8 +93,8 @@ int WINAPI SetProtocolPluginFcnImportFcn(HYAMNPROTOPLUGIN Plugin,PYAMN_PROTOIMPO
Plugin->Fcn=YAMNFcn;
Plugin->MailFcn=YAMNMailFcn;
- EnterCriticalSection(&PluginRegCS);
-//We add protocol to the protocol list
+ mir_cslock lck(PluginRegCS);
+ // We add protocol to the protocol list
for (Parser=FirstProtoPlugin;Parser != NULL && Parser->Next != NULL;Parser=Parser->Next);
if (Parser==NULL)
{
@@ -109,8 +109,6 @@ int WINAPI SetProtocolPluginFcnImportFcn(HYAMNPROTOPLUGIN Plugin,PYAMN_PROTOIMPO
Parser->Plugin=Plugin;
Parser->Next=NULL;
-
- LeaveCriticalSection(&PluginRegCS);
return 1;
}
@@ -161,20 +159,17 @@ INT_PTR UnregisterProtocolPluginSvc(WPARAM wParam,LPARAM)
{
HYAMNPROTOPLUGIN Plugin=(HYAMNPROTOPLUGIN)wParam;
- EnterCriticalSection(&PluginRegCS);
+ mir_cslock lck(PluginRegCS);
UnregisterProtocolPlugin(Plugin);
- LeaveCriticalSection(&PluginRegCS);
return 1;
-
}
INT_PTR UnregisterProtoPlugins()
{
- EnterCriticalSection(&PluginRegCS);
-//We remove protocols from the protocol list
+ mir_cslock lck(PluginRegCS);
+ // We remove protocols from the protocol list
while(FirstProtoPlugin != NULL)
UnregisterProtocolPlugin(FirstProtoPlugin->Plugin);
- LeaveCriticalSection(&PluginRegCS);
return 1;
}