From 92988cf2bad1a0f8b2fd3aeb73fb2adb61f7ba0d Mon Sep 17 00:00:00 2001 From: Zhenchao Li Date: Mon, 5 Jul 2010 19:54:59 +0800 Subject: [PATCH] fix bug: use jid without resource --- src/common/jingle_ft.py | 6 ++++-- src/common/protocol/bytestream.py | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/common/jingle_ft.py b/src/common/jingle_ft.py index 4e3198a12..8a3a4d024 100644 --- a/src/common/jingle_ft.py +++ b/src/common/jingle_ft.py @@ -132,7 +132,8 @@ class JingleFileTransfer(JingleContent): def __on_transport_info(self, stanza, content, error, action): log.info("__on_transport_info") - gajim.socks5queue.send_file(self.file_props, self.session.ourjid) + jid = gajim.get_jid_without_resource(self.session.ourjid) + gajim.socks5queue.send_file(self.file_props, jid) def __on_iq_result(self, stanza, content, error, action): log.info("__on_iq_result") @@ -155,7 +156,8 @@ class JingleFileTransfer(JingleContent): else: # session-accept iq-result if not gajim.socks5queue.get_file_props(self.session.ourjid, self.file_props['sid']): gajim.socks5queue.add_file_props(self.session.ourjid, self.file_props) - gajim.socks5queue.connect_to_hosts(self.session.ourjid, self.file_props['sid'], + jid = gajim.get_jid_without_resource(self.session.ourjid) + gajim.socks5queue.connect_to_hosts(jid, self.file_props['sid'], self.send_candidate_used, self._on_connect_error) def send_candidate_used(self, streamhost): diff --git a/src/common/protocol/bytestream.py b/src/common/protocol/bytestream.py index 71f4327c8..a1ed9d593 100644 --- a/src/common/protocol/bytestream.py +++ b/src/common/protocol/bytestream.py @@ -138,7 +138,8 @@ class ConnectionBytestream: jid = gajim.get_jid_without_resource(file_props['sender']) resource = gajim.get_resource_from_jid(file_props['sender']) sid = file_props['sid'] - gajim.socks5queue.add_file_props(session.ourjid, file_props) + wr_ourjid = gajim.get_jid_without_resource(session.ourjid) + gajim.socks5queue.add_file_props(wr_ourjid, file_props) if not session.accepted: session.approve_session()