From 533e36c22c8d18a699d5fcf527873a19c2ca3e54 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 29 Apr 2009 07:46:24 +0000 Subject: [PATCH] close filtransfers when we get an offline presence, but only for this resource. Fixes #4980 --- src/common/connection_handlers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py index 6d38e0d37..41486a15c 100644 --- a/src/common/connection_handlers.py +++ b/src/common/connection_handlers.py @@ -112,13 +112,13 @@ class ConnectionBytestream: for file_props in self.files_props.values(): if self.is_transfer_stopped(file_props): continue - receiver_jid = unicode(file_props['receiver']).split('/')[0] - if contact.jid == receiver_jid: + receiver_jid = unicode(file_props['receiver']) + if contact.get_full_jid() == receiver_jid: file_props['error'] = -5 self.remove_transfer(file_props) self.dispatch('FILE_REQUEST_ERROR', (contact.jid, file_props, '')) - sender_jid = unicode(file_props['sender']).split('/')[0] - if contact.jid == sender_jid: + sender_jid = unicode(file_props['sender']) + if contact.get_full_jid() == sender_jid: file_props['error'] = -3 self.remove_transfer(file_props)