From 11c6abda3588d8e68220e778a8ef9c56f75e3c59 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 6 Oct 2011 09:11:14 +0200 Subject: [PATCH] fixes IBB. Fixes #6990 --- src/common/protocol/bytestream.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/common/protocol/bytestream.py b/src/common/protocol/bytestream.py index 4b4ad1dac..9e7504c31 100644 --- a/src/common/protocol/bytestream.py +++ b/src/common/protocol/bytestream.py @@ -721,11 +721,6 @@ class ConnectionIBBytestream(ConnectionBytestream): def __init__(self): ConnectionBytestream.__init__(self) self._streams = {} - self._ampnode = xmpp.Node(xmpp.NS_AMP + ' amp', payload=[xmpp.Node( - 'rule', {'condition': 'deliver-at', 'value': 'stored', - 'action': 'error'}), xmpp.Node('rule', - {'condition': 'match-resource', 'value': 'exact', - 'action':'error'})]) self.last_sent_ibb_id = None def IBBIqHandler(self, conn, stanza): @@ -840,9 +835,9 @@ class ConnectionIBBytestream(ConnectionBytestream): file_props['started'] = True if file_props['seq'] == 65536: file_props['seq'] = 0 - self.last_sent_ibb_id = self.connection.send(xmpp.Protocol('iq', - file_props['direction'][1:], payload=[datanode, - self._ampnode])) + self.last_sent_ibb_id = self.connection.send(xmpp.Protocol( + name='iq', to=file_props['direction'][1:], typ='set', + payload=[datanode])) current_time = time.time() file_props['elapsed-time'] += current_time - file_props[ 'last-time']