summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/icq_xstatus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/IcqOscarJ/src/icq_xstatus.cpp')
-rw-r--r--protocols/IcqOscarJ/src/icq_xstatus.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp
index af99fd5ec2..7c25aca840 100644
--- a/protocols/IcqOscarJ/src/icq_xstatus.cpp
+++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp
@@ -100,9 +100,11 @@ DWORD CIcqProto::requestXStatusDetails(MCONTACT hContact, BOOL bAllowDelay)
DWORD dwCookie;
};
- m_ratesMutex->Enter();
- WORD wGroup = m_rates->getGroupFromSNAC(ICQ_MSG_FAMILY, ICQ_MSG_SRV_SEND);
- m_ratesMutex->Leave();
+ WORD wGroup;
+ {
+ mir_cslock l(m_ratesMutex);
+ wGroup = m_rates->getGroupFromSNAC(ICQ_MSG_FAMILY, ICQ_MSG_SRV_SEND);
+ }
rates_xstatus_request rr(this, wGroup);
rr.bForced = !bAllowDelay;
@@ -523,11 +525,12 @@ void CIcqProto::updateServerCustomStatus(int fullUpdate)
// retrieve standard status message (e.g. custom status set to none)
else {
char **pszMsg = MirandaStatusToAwayMsg(m_iStatus);
-
- m_modeMsgsMutex->Enter();
- if (pszMsg)
- szStatusNote = null_strdup(*pszMsg);
- m_modeMsgsMutex->Leave();
+ {
+ mir_cslock l(m_modeMsgsMutex);
+ if (pszMsg)
+ szStatusNote = null_strdup(*pszMsg);
+ }
+
// no default status message, set empty
if (!szStatusNote)
szStatusNote = null_strdup("");