changeset 34b5c42a7656 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=34b5c42a7656
description: only compare file hashes when we actually have a hash
diffstat:
src/common/jingle_ft.py | 3 ++-
src/filetransfers_window.py | 2 +-
src/gui_interface.py | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diffs (37 lines):
diff -r 73ede4f2f62c -r 34b5c42a7656 src/common/jingle_ft.py
--- a/src/common/jingle_ft.py Fri Oct 12 00:05:26 2012 -0400
+++ b/src/common/jingle_ft.py Sat Oct 13 14:31:16 2012 -0400
@@ -184,7 +184,8 @@
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 and self.file_props.algo:
+ if self.file_props.hash_ is None and self.file_props.algo and \
+ not self.werequest:
self.hashThread = threading.Thread(target=self.__send_hash)
self.hashThread.start()
for host in self.file_props.streamhosts:
diff -r 73ede4f2f62c -r 34b5c42a7656 src/filetransfers_window.py
--- a/src/filetransfers_window.py Fri Oct 12 00:05:26 2012 -0400
+++ b/src/filetransfers_window.py Sat Oct 13 14:31:16 2012 -0400
@@ -660,7 +660,7 @@
if transfered_size == full_size:
# If we are receiver and this is a jingle session
if file_props.type_ == 'r' and \
- file_props.session_type == 'jingle':
+ file_props.session_type == 'jingle' and file_props.hash_:
# Show that we are computing the hash
self.set_status(file_props, 'computing')
else:
diff -r 73ede4f2f62c -r 34b5c42a7656 src/gui_interface.py
--- a/src/gui_interface.py Fri Oct 12 00:05:26 2012 -0400
+++ b/src/gui_interface.py Sat Oct 13 14:31:16 2012 -0400
@@ -985,7 +985,7 @@
if file_props.stalled or file_props.paused:
return
- if file_props.type_ == 'r': # we receive a file
+ if file_props.type_ == 'r' and file_props.hash_: # we receive a file
# we compare hashes
if file_props.session_type == 'jingle':
# Compare hashes in a new thread