diff options
Diffstat (limited to 'protocols/JabberG/src/jabber_svc.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_svc.cpp | 6 |
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;
}
|