From 400f08db9db4c122a18209934e40704c6df4e492 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Wed, 22 May 2013 14:27:14 -0700 Subject: [PATCH] Fix crash conditions in IBB --- sleekxmpp/plugins/xep_0047/ibb.py | 4 ++-- 1 file 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)