diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-10 13:49:11 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-10 13:49:11 +0000 |
commit | 73efaa00c6044d77a6c098bec38057b231ef8243 (patch) | |
tree | 07237735ddf83c6cb011188b6c4b067bdcd6b5e3 /protocols/JabberG/src/jabber_send_manager.cpp | |
parent | 183f4dfbadce9c687c66e5377274a464f6c9a72f (diff) |
Jabber:
- these long static buffers replaced with CMString;
- some crazy memory allocations in chats also replaced with CMString;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@7577 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_send_manager.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_send_manager.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/protocols/JabberG/src/jabber_send_manager.cpp b/protocols/JabberG/src/jabber_send_manager.cpp index a877e64821..0ada2e018a 100644 --- a/protocols/JabberG/src/jabber_send_manager.cpp +++ b/protocols/JabberG/src/jabber_send_manager.cpp @@ -34,20 +34,13 @@ BOOL CJabberSendManager::FillPermanentHandlers() BOOL CJabberSendManager::HandleSendPermanent(HXML node, ThreadData *pThreadData)
{
- BOOL bStopHandling = FALSE;
- Lock();
- CJabberSendPermanentInfo *pInfo = m_pPermanentHandlers;
- while (pInfo && !bStopHandling) {
+ mir_cslock lck(m_cs);
+ for (CJabberSendPermanentInfo *pInfo = m_pPermanentHandlers; pInfo; pInfo = pInfo->m_pNext) {
CJabberSendInfo sendInfo;
sendInfo.m_pUserData = pInfo->m_pUserData;
-
- if ((ppro->*(pInfo->m_pHandler))(node, pThreadData, &sendInfo)) {
- bStopHandling = TRUE;
- break;
- }
- pInfo = pInfo->m_pNext;
+ if ((ppro->*(pInfo->m_pHandler))(node, pThreadData, &sendInfo))
+ return true;
}
- Unlock();
- return bStopHandling;
+ return false;
}
|