summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandro Munda <sandro.munda@guardis.com>2012-06-07 19:24:23 +0200
committerSandro Munda <sandro.munda@guardis.com>2012-06-07 19:24:23 +0200
commit1851ab6f5fe3548eccbc118bdb71340ee92dd9da (patch)
tree83b87a0f462ebad6d2c02c76989a16968335287a
parent289b0523387e3c6dc7bde1161736aa791d6bcc99 (diff)
downloadslixmpp-1851ab6f5fe3548eccbc118bdb71340ee92dd9da.tar.gz
slixmpp-1851ab6f5fe3548eccbc118bdb71340ee92dd9da.tar.bz2
slixmpp-1851ab6f5fe3548eccbc118bdb71340ee92dd9da.tar.xz
slixmpp-1851ab6f5fe3548eccbc118bdb71340ee92dd9da.zip
Added the SID in the socks_recv xmpp event in the xep_0065 plugin.
-rw-r--r--sleekxmpp/plugins/xep_0065/proxy.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/sleekxmpp/plugins/xep_0065/proxy.py b/sleekxmpp/plugins/xep_0065/proxy.py
index f950b6aa..60b7d6ed 100644
--- a/sleekxmpp/plugins/xep_0065/proxy.py
+++ b/sleekxmpp/plugins/xep_0065/proxy.py
@@ -214,6 +214,12 @@ class xep_0065(base_plugin):
def on_recv(self, sid, data):
""" Calls when data is recv from the Proxy socket associated
to the SID.
+
+ Triggers a socks_closed event if the socket is closed. The sid
+ is passed to this event.
+
+ Triggers a socks_recv event if there's available data. A dict
+ that contains the sid and the data is passed to this event.
"""
proxy = self.proxy_threads.get(sid)
@@ -221,7 +227,7 @@ class xep_0065(base_plugin):
if not data:
self.xmpp.event('socks_closed', sid)
else:
- self.xmpp.event('socks_recv', data)
+ self.xmpp.event('socks_recv', {'sid': sid, 'data': data})
class Proxy(Thread):