summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_ft.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-10-02 20:37:58 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-10-02 20:37:58 +0000
commit681126055acd747349453a57bbed6624420e0c6e (patch)
tree853d5ae4e303cfe9951c10de9e9a8cb9fbcfe314 /protocols/JabberG/src/jabber_ft.cpp
parentbed8dcfa17b2f9de35a145826c2a4201e6daff13 (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_ft.cpp')
-rw-r--r--protocols/JabberG/src/jabber_ft.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp
index 99cbc79b70..2bf763e775 100644
--- a/protocols/JabberG/src/jabber_ft.cpp
+++ b/protocols/JabberG/src/jabber_ft.cpp
@@ -30,19 +30,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
void CJabberProto::FtCancel(filetransfer *ft)
{
- JABBER_LIST_ITEM *item;
- JABBER_BYTE_TRANSFER *jbt;
- JABBER_IBB_TRANSFER *jibb;
-
Log("Invoking JabberFtCancel()");
// For file sending session that is still in si negotiation phase
if (m_iqManager.ExpireByUserData(ft))
return;
+
// For file receiving session that is still in si negotiation phase
LISTFOREACH(i, this, LIST_FTRECV)
{
- item = ListGetItemPtrFromIndex(i);
+ JABBER_LIST_ITEM *item = ListGetItemPtrFromIndex(i);
if (item->ft == ft) {
Log("Canceling file receiving session while in si negotiation");
ListRemoveByIndex(i);
@@ -52,7 +49,8 @@ void CJabberProto::FtCancel(filetransfer *ft)
}
}
// For file transfer through bytestream
- if ((jbt=ft->jbt) != NULL) {
+ JABBER_BYTE_TRANSFER *jbt = ft->jbt;
+ if (jbt != NULL) {
Log("Canceling bytestream session");
jbt->state = JBT_ERROR;
if (jbt->hConn) {
@@ -64,8 +62,10 @@ void CJabberProto::FtCancel(filetransfer *ft)
if (jbt->hEvent) SetEvent(jbt->hEvent);
if (jbt->hProxyEvent) SetEvent(jbt->hProxyEvent);
}
+
// For file transfer through IBB
- if ((jibb=ft->jibb) != NULL) {
+ JABBER_IBB_TRANSFER *jibb = ft->jibb;
+ if (jibb != NULL) {
Log("Canceling IBB session");
jibb->state = JIBB_ERROR;
m_iqManager.ExpireByUserData(jibb);