changeset 2bf24a2cc140 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=2bf24a2cc140 description: calculate hash after we get session accept
diffstat:
src/common/jingle_ft.py | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
diffs (28 lines):
diff -r 631684dec21b -r 2bf24a2cc140 src/common/jingle_ft.py --- a/src/common/jingle_ft.py Sat Aug 25 12:25:30 2012 +0200 +++ b/src/common/jingle_ft.py Sat Aug 25 11:14:38 2012 -0400 @@ -119,11 +119,7 @@ self._listen_host()
def __on_session_initiate_sent(self, stanza, content, error, action): - # Calculate file hash in a new thread - # if we haven't sent the hash already. - if self.file_props.hash_ is None: - self.hashThread = threading.Thread(target=self.__send_hash) - self.hashThread.start() + pass
def __send_hash(self): # Send hash in a session info @@ -167,6 +163,11 @@ self.__state_changed(STATE_TRANSFERING) raise xmpp.NodeProcessed self.file_props.streamhosts = self.transport.remote_candidates + # Calculate file hash in a new thread + # if we haven't sent the hash already. + if self.file_props.hash_ is None: + self.hashThread = threading.Thread(target=self.__send_hash) + self.hashThread.start() for host in self.file_props.streamhosts: host['initiator'] = self.session.initiator host['target'] = self.session.responder