send a session-terminate at the end of a jingle filetransfer

This commit is contained in:
Yann Leboulanger 2010-08-25 13:01:35 +02:00
parent 6911821a28
commit f03cdbbebf
1 changed files with 7 additions and 0 deletions

View File

@ -1407,11 +1407,18 @@ class Interface:
if 'stalled' in file_props and file_props['stalled'] or \
'paused' in file_props and file_props['paused']:
return
if file_props['type'] == 'r': # we receive a file
jid = unicode(file_props['sender'])
else: # we send a file
jid = unicode(file_props['receiver'])
# End jingle session
if file_props['session-type'] == 'jingle' and file_props['type'] == 'r':
session = gajim.connections[account].get_jingle_session(jid,
sid=file_props['session-sid'])
session.end_session()
if helpers.allow_popup_window(account):
if file_props['error'] == 0:
if gajim.config.get('notify_on_file_complete'):