From ecda1686349fb1cbb5db8b7405285992f20aaede Mon Sep 17 00:00:00 2001 From: Dimitur Kirov Date: Fri, 7 Oct 2005 11:57:04 +0000 Subject: [PATCH] call disconnect_transfer to prevent duplicating code --- src/common/connection.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/common/connection.py b/src/common/connection.py index 7f49b5576..3d6b00f27 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -730,14 +730,7 @@ class Connection: def remove_transfer(self, file_props, remove_from_list = True): if file_props is None: return - if file_props.has_key('hash'): - gajim.socks5queue.remove_sender(file_props['hash']) - - if file_props.has_key('streamhosts'): - for host in file_props['streamhosts']: - if host.has_key('idx') and host['idx'] > 0: - gajim.socks5queue.remove_receiver(host['idx']) - gajim.socks5queue.remove_sender(host['idx']) + self.disconnect_transfer(file_props) sid = file_props['sid'] gajim.socks5queue.remove_file_props(self.name, sid) @@ -1030,7 +1023,7 @@ class Connection: feature.addChild(node=_feature) field = _feature.setField('stream-method') field.setAttr('type', 'list-single') - field.addOption('http://jabber.org/protocol/bytestreams') + field.addOption(common.xmpp.NS_BYTESTREAM) self.to_be_sent.append(iq) def _rosterSetCB(self, con, iq_obj):