dont compare hashes on SI transfer

This commit is contained in:
Jefry Lagrange 2012-04-07 23:12:15 -04:00
parent 038ea0fe66
commit 66df7c30ca
2 changed files with 10 additions and 7 deletions

View file

@ -639,7 +639,9 @@ class FileTransfersWindow:
status = 'stop' status = 'stop'
self.model.set(iter_, 0, self.get_icon(status)) self.model.set(iter_, 0, self.get_icon(status))
if transfered_size == full_size: if transfered_size == full_size:
if file_props['type'] == 'r': # If we are receiver and this is a jingle session
if file_props['type'] == 'r' and 'session-sid' in file_props:
# Show that we are computing the hash
self.set_status(typ, sid, 'computing') self.set_status(typ, sid, 'computing')
else: else:
self.set_status(typ, sid, 'ok') self.set_status(typ, sid, 'ok')

View file

@ -34,7 +34,6 @@
## You should have received a copy of the GNU General Public License ## You should have received a copy of the GNU General Public License
## along with Gajim. If not, see <http://www.gnu.org/licenses/>. ## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
## ##
import os import os
import sys import sys
import re import re
@ -954,11 +953,13 @@ class Interface:
return return
if file_props['type'] == 'r': # we receive a file if file_props['type'] == 'r': # we receive a file
jid = unicode(file_props['sender']) # If we have a jingle session id, it is a jingle transfer
# Compare hashes in a new thread # we compare hashes
self.hashThread = Thread(target=self.__compare_hashes, if 'session-sid' in file_props:
args=(account, file_props)) # Compare hashes in a new thread
self.hashThread.start() self.hashThread = Thread(target=self.__compare_hashes,
args=(account, file_props))
self.hashThread.start()
gajim.socks5queue.remove_receiver(file_props['sid'], True, True) gajim.socks5queue.remove_receiver(file_props['sid'], True, True)
else: # we send a file else: # we send a file
jid = unicode(file_props['receiver']) jid = unicode(file_props['receiver'])