summaryrefslogtreecommitdiff
path: root/plugins/MirOTR/src/utils.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-04-30 08:05:40 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-04-30 08:05:40 +0000
commit34d561d1468bfd0a380d755d6c991ec1b7ed79cf (patch)
tree61a6267280dd6808cf5310a8981cce4a530f2674 /plugins/MirOTR/src/utils.cpp
parent944482ac36d1f1d6e14cf791130bea5c7c9de01b (diff)
minus critical section
git-svn-id: http://svn.miranda-ng.org/main/trunk@13283 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirOTR/src/utils.cpp')
-rw-r--r--plugins/MirOTR/src/utils.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/plugins/MirOTR/src/utils.cpp b/plugins/MirOTR/src/utils.cpp
index 2b84202d52..2cb11f610f 100644
--- a/plugins/MirOTR/src/utils.cpp
+++ b/plugins/MirOTR/src/utils.cpp
@@ -1,25 +1,10 @@
#include "stdafx.h"
-CRITICAL_SECTION lib_cs;
-
-void InitUtils()
-{
- InitializeCriticalSection(&lib_cs);
-}
-
-void DeinitUtils()
-{
- DeleteCriticalSection(&lib_cs);
-}
+mir_cs lib_cs;
void lib_cs_lock()
{
- EnterCriticalSection(&lib_cs);
-}
-
-void lib_cs_unlock()
-{
- LeaveCriticalSection(&lib_cs);
+ mir_cslock lck(lib_cs);
}
MCONTACT find_contact(const char* userid, const char* protocol)
@@ -76,7 +61,6 @@ void VerifyFingerprint(ConnContext *context, bool verify) {
lib_cs_lock();
otrl_context_set_trust(context->active_fingerprint, (verify)?"verified":NULL);
otrl_privkey_write_fingerprints(otr_user_state, _T2A(g_fingerprint_store_filename));
- lib_cs_unlock();
VerifyFingerprintMessage(context, verify);
}