summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2013-05-22 14:27:14 -0700
committerLance Stout <lancestout@gmail.com>2013-05-22 14:27:14 -0700
commit400f08db9db4c122a18209934e40704c6df4e492 (patch)
tree5bb9e584514223d3a783743612c6fdc2e98b7a95 /sleekxmpp/plugins
parente48b650caa0f6ef6706d3ec488fe33d88a54fe5c (diff)
downloadslixmpp-400f08db9db4c122a18209934e40704c6df4e492.tar.gz
slixmpp-400f08db9db4c122a18209934e40704c6df4e492.tar.bz2
slixmpp-400f08db9db4c122a18209934e40704c6df4e492.tar.xz
slixmpp-400f08db9db4c122a18209934e40704c6df4e492.zip
Fix crash conditions in IBB
Diffstat (limited to 'sleekxmpp/plugins')
-rw-r--r--sleekxmpp/plugins/xep_0047/ibb.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sleekxmpp/plugins/xep_0047/ibb.py b/sleekxmpp/plugins/xep_0047/ibb.py
index 6110b26c..62dddac2 100644
--- a/sleekxmpp/plugins/xep_0047/ibb.py
+++ b/sleekxmpp/plugins/xep_0047/ibb.py
@@ -85,7 +85,7 @@ class XEP_0047(BasePlugin):
self._streams[(jid, sid, peer_jid)] = stream
def _del_stream(self, jid, sid, peer_jid, data):
- with self._streams_lock:
+ with self._stream_lock:
if (jid, sid, peer_jid) in self._streams:
del self._streams[(jid, sid, peer_jid)]
@@ -207,7 +207,7 @@ class XEP_0047(BasePlugin):
def _handle_close(self, iq):
sid = iq['ibb_close']['sid']
- stream = self.api['get_stream'](stanza['to'], sid, stanza['from'])
+ stream = self.api['get_stream'](iq['to'], sid, iq['from'])
if stream is not None and iq['from'] == stream.peer_jid:
stream._closed(iq)
self.api['del_stream'](stream.self_jid, stream.sid, stream.peer_jid)