only delete file_props in the ft_window
This commit is contained in:
parent
1a3e4508ff
commit
1dc1adf073
|
@ -92,9 +92,6 @@ class JingleFileTransfer(JingleContent):
|
|||
self.transport.set_our_jid(session.ourjid)
|
||||
log.info('ourjid: %s' % session.ourjid)
|
||||
|
||||
if self.file_props is not None:
|
||||
self.file_props.sid = self.transport.sid
|
||||
|
||||
self.session = session
|
||||
self.media = 'file'
|
||||
self.nominated_cand = {}
|
||||
|
|
|
@ -325,8 +325,6 @@ class ConnectionSocks5Bytestream(ConnectionBytestream):
|
|||
return
|
||||
self.disconnect_transfer(file_props)
|
||||
sid = file_props.sid
|
||||
gajim.socks5queue.remove_file_props(self.name, sid)
|
||||
|
||||
|
||||
def disconnect_transfer(self, file_props):
|
||||
if file_props is None:
|
||||
|
@ -340,11 +338,6 @@ class ConnectionSocks5Bytestream(ConnectionBytestream):
|
|||
gajim.socks5queue.remove_receiver(host['idx'])
|
||||
gajim.socks5queue.remove_sender(host['idx'])
|
||||
|
||||
if file_props.direction:
|
||||
# it's a IBB
|
||||
FilesProp.deleteFileProp(file_props)
|
||||
del(file_props)
|
||||
|
||||
def _send_socks5_info(self, file_props):
|
||||
"""
|
||||
Send iq for the present streamhosts and proxies
|
||||
|
@ -880,8 +873,6 @@ class ConnectionIBBytestream(ConnectionBytestream):
|
|||
payload=[xmpp.Node(xmpp.NS_IBB + ' close',
|
||||
{'sid':sid})]))
|
||||
file_props.completed = True
|
||||
FilesProp.deleteFileProp(file_props)
|
||||
del(file_props)
|
||||
|
||||
def IBBMessageHandler(self, conn, stanza):
|
||||
"""
|
||||
|
@ -947,7 +938,6 @@ class ConnectionIBBytestream(ConnectionBytestream):
|
|||
conn.send(reply)
|
||||
file_props.fp.close()
|
||||
gajim.socks5queue.complete_transfer_cb(self.name, file_props)
|
||||
gajim.socks5queue.remove_file_props(self.name, sid)
|
||||
else:
|
||||
conn.send(xmpp.Error(stanza, xmpp.ERR_ITEM_NOT_FOUND))
|
||||
|
||||
|
@ -970,8 +960,6 @@ class ConnectionIBBytestream(ConnectionBytestream):
|
|||
conn.Event('IBB', 'ERROR ON RECEIVE', file_props)
|
||||
else:
|
||||
conn.Event('IBB', 'ERROR ON SEND', file_props)
|
||||
FilesProp.deleteFileProp(file_props)
|
||||
del(file_props)
|
||||
elif stanza.getType() == 'result':
|
||||
if file_props.direction[0] == '|':
|
||||
file_props.direction = file_props.direction[1:]
|
||||
|
|
|
@ -320,22 +320,6 @@ class SocksQueue:
|
|||
result = sender.send_file()
|
||||
self.process_result(result, sender)
|
||||
|
||||
def remove_file_props(self, account, sid):
|
||||
fp = FilesProp.getFileProp(account, sid)
|
||||
if not fp:
|
||||
log.warning('trying to remove a file props that doesnt exist ' +
|
||||
'from account ' + str(account) + ' and sid ' + str(sid))
|
||||
return
|
||||
if sid in self.on_success:
|
||||
del self.on_success[fp.sid]
|
||||
if sid in self.on_failure:
|
||||
del self.on_failure[fp.sid]
|
||||
|
||||
FilesProp.deleteFileProp(fp)
|
||||
|
||||
if len(FilesProp.getFilePropByAccount(account)) == 0:
|
||||
self.connected = 0
|
||||
|
||||
def isHashInSockObjs(self, sockobjs, hash):
|
||||
'''
|
||||
It tells wether there is a particular hash in sockobjs or not
|
||||
|
|
|
@ -1970,9 +1970,9 @@ class RosterWindow:
|
|||
return True
|
||||
elif event.type_ in ('file-error', 'file-stopped'):
|
||||
msg_err = ''
|
||||
if data['error'] == -1:
|
||||
if data.error == -1:
|
||||
msg_err = _('Remote contact stopped transfer')
|
||||
elif data['error'] == -6:
|
||||
elif data.error == -6:
|
||||
msg_err = _('Error opening file')
|
||||
ft.show_stopped(jid, data, error_msg=msg_err)
|
||||
gajim.events.remove_events(account, jid, event)
|
||||
|
|
Loading…
Reference in New Issue