summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_svc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-09-22 21:07:09 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-09-22 21:07:09 +0000
commitfff6c9fc6c8ce7d5fc2aff3444073f4a6069944d (patch)
tree0ac94369bfd9ef57876d77989dd6fc9eb3a7d4f6 /protocols/JabberG/src/jabber_svc.cpp
parent2f615cdb8d20660d6731a782b8a90e29628cfbc4 (diff)
- crash fix;
- code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@6189 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_svc.cpp')
-rw-r--r--protocols/JabberG/src/jabber_svc.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp
index df56450d5b..6c2bdb3d12 100644
--- a/protocols/JabberG/src/jabber_svc.cpp
+++ b/protocols/JabberG/src/jabber_svc.cpp
@@ -43,7 +43,7 @@ INT_PTR __cdecl CJabberProto::GetMyAwayMsg(WPARAM wParam, LPARAM lParam)
TCHAR *szStatus = NULL;
INT_PTR nRetVal = 0;
- EnterCriticalSection(&m_csModeMsgMutex);
+ mir_cslock lck(m_csModeMsgMutex);
switch (wParam ? (int)wParam : m_iStatus) {
case ID_STATUS_ONLINE:
szStatus = m_modeMsgs.szOnline;
@@ -63,13 +63,11 @@ INT_PTR __cdecl CJabberProto::GetMyAwayMsg(WPARAM wParam, LPARAM lParam)
case ID_STATUS_FREECHAT:
szStatus = m_modeMsgs.szFreechat;
break;
- default:
- // Should not reach here
+ default: // Should not reach here
break;
}
if (szStatus)
nRetVal = (lParam & SGMA_UNICODE) ? (INT_PTR)mir_t2u(szStatus) : (INT_PTR)mir_t2a(szStatus);
- LeaveCriticalSection(&m_csModeMsgMutex);
return nRetVal;
}