diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-02 20:37:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-02 20:37:58 +0000 |
commit | 681126055acd747349453a57bbed6624420e0c6e (patch) | |
tree | 853d5ae4e303cfe9951c10de9e9a8cb9fbcfe314 /protocols/JabberG/src/jabber_iq.cpp | |
parent | bed8dcfa17b2f9de35a145826c2a4201e6daff13 (diff) |
Jabber IQ handlers: ability to handle the same packet by two or more handlers
git-svn-id: http://svn.miranda-ng.org/main/trunk@6314 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_iq.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_iq.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_iq.cpp b/protocols/JabberG/src/jabber_iq.cpp index 6af37f07a3..e5dbecfe31 100644 --- a/protocols/JabberG/src/jabber_iq.cpp +++ b/protocols/JabberG/src/jabber_iq.cpp @@ -185,8 +185,11 @@ BOOL CJabberIqManager::ExpireIq(int nIqId) {
CJabberIqInfo *pInfo = DetachInfo(nIqId);
if (pInfo) {
- ExpireInfo(pInfo);
- delete pInfo;
+ do {
+ ExpireInfo(pInfo);
+ delete pInfo;
+ }
+ while ((pInfo = DetachInfo(nIqId)) != NULL);
return TRUE;
}
return FALSE;
@@ -263,7 +266,10 @@ BOOL CJabberIqManager::HandleIq(int nIqId, HXML pNode) return FALSE;
CJabberIqInfo *pInfo = DetachInfo(nIqId);
- if (pInfo) {
+ if (pInfo == NULL)
+ return FALSE;
+
+ do {
pInfo->m_nIqType = nIqType;
if (nIqType == JABBER_IQ_TYPE_RESULT) {
if (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_CHILD_TAG_NODE)
@@ -288,9 +294,9 @@ BOOL CJabberIqManager::HandleIq(int nIqId, HXML pNode) (ppro->*(pInfo->m_pHandler))(pNode, pInfo);
delete pInfo;
- return TRUE;
}
- return FALSE;
+ while ((pInfo = DetachInfo(nIqId)) != NULL);
+ return TRUE;
}
BOOL CJabberIqManager::HandleIqPermanent(HXML pNode)
|