diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2015-04-14 17:46:50 +0200 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2015-04-14 19:14:56 +0200 |
commit | eb4e09b0ca2f699405c448ae7e4b818ff72ea301 (patch) | |
tree | 223634e5326a40ac963ee35fd159fafe09dbf771 /slixmpp/plugins/xep_0047/ibb.py | |
parent | ce085bf4f4714d6073e297b599d39b42fcfe218f (diff) | |
download | slixmpp-eb4e09b0ca2f699405c448ae7e4b818ff72ea301.tar.gz slixmpp-eb4e09b0ca2f699405c448ae7e4b818ff72ea301.tar.bz2 slixmpp-eb4e09b0ca2f699405c448ae7e4b818ff72ea301.tar.xz slixmpp-eb4e09b0ca2f699405c448ae7e4b818ff72ea301.zip |
XEP-0047: allow only one window over the stream.
Diffstat (limited to 'slixmpp/plugins/xep_0047/ibb.py')
-rw-r--r-- | slixmpp/plugins/xep_0047/ibb.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/slixmpp/plugins/xep_0047/ibb.py b/slixmpp/plugins/xep_0047/ibb.py index de801877..d1c708ed 100644 --- a/slixmpp/plugins/xep_0047/ibb.py +++ b/slixmpp/plugins/xep_0047/ibb.py @@ -22,7 +22,6 @@ class XEP_0047(BasePlugin): default_config = { 'block_size': 4096, 'max_block_size': 8192, - 'window_size': 1, 'auto_accept': False, } @@ -106,7 +105,7 @@ class XEP_0047(BasePlugin): def _preauthorize_sid(self, jid, sid, ifrom, data): self._preauthed_sids[(jid, sid, ifrom)] = True - def open_stream(self, jid, block_size=None, sid=None, window=1, use_messages=False, + def open_stream(self, jid, block_size=None, sid=None, use_messages=False, ifrom=None, timeout=None, callback=None): if sid is None: sid = str(uuid.uuid4()) @@ -122,8 +121,7 @@ class XEP_0047(BasePlugin): iq['ibb_open']['stanza'] = 'message' if use_messages else 'iq' stream = IBBytestream(self.xmpp, sid, block_size, - iq['from'], iq['to'], window, - use_messages) + iq['from'], iq['to'], use_messages) self._pending_streams[iq['id']] = stream @@ -168,8 +166,7 @@ class XEP_0047(BasePlugin): raise XMPPError('resource-constraint') stream = IBBytestream(self.xmpp, sid, size, - iq['to'], iq['from'], - self.window_size) + iq['to'], iq['from']) stream.stream_started.set() self.api['set_stream'](stream.self_jid, stream.sid, stream.peer_jid, stream) iq.reply().send() |