diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-07-30 17:52:59 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-07-30 17:52:59 +0200 |
commit | ab03ad54aaca1725b943abf16585fa4ef6f08897 (patch) | |
tree | 66a18ee01a78b99dbcb5123ea09be523c766cc47 /slixmpp/plugins/xep_0115 | |
parent | 2e571ac95089f15df7eee8f29d519f2bef425d4d (diff) | |
download | slixmpp-ab03ad54aaca1725b943abf16585fa4ef6f08897.tar.gz slixmpp-ab03ad54aaca1725b943abf16585fa4ef6f08897.tar.bz2 slixmpp-ab03ad54aaca1725b943abf16585fa4ef6f08897.tar.xz slixmpp-ab03ad54aaca1725b943abf16585fa4ef6f08897.zip |
Fix the iq.send() function, and a bunch of places where it is called
This is a big-and-dirty commit with a bunch of cleanup, maybe breaking a few
things, and not fixing all iq.send() calls yet.
Diffstat (limited to 'slixmpp/plugins/xep_0115')
-rw-r--r-- | slixmpp/plugins/xep_0115/caps.py | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/slixmpp/plugins/xep_0115/caps.py b/slixmpp/plugins/xep_0115/caps.py index c548de11..5974699c 100644 --- a/slixmpp/plugins/xep_0115/caps.py +++ b/slixmpp/plugins/xep_0115/caps.py @@ -9,7 +9,6 @@ import logging import hashlib import base64 -import threading from slixmpp import __version__ from slixmpp.stanza import StreamFeatures, Presence, Iq @@ -65,8 +64,7 @@ class XEP_0115(BasePlugin): self.xmpp.add_filter('out', self._filter_add_caps) - self.xmpp.add_event_handler('entity_caps', self._process_caps, - threaded=True) + self.xmpp.add_event_handler('entity_caps', self._process_caps) if not self.xmpp.is_component: self.xmpp.register_feature('caps', @@ -90,9 +88,6 @@ class XEP_0115(BasePlugin): disco.assign_verstring = self.assign_verstring disco.get_verstring = self.get_verstring - self._processing_lock = threading.Lock() - self._processing = set() - def plugin_end(self): self.xmpp['xep_0030'].del_feature(feature=stanza.Capabilities.namespace) self.xmpp.del_filter('out', self._filter_add_caps) @@ -164,13 +159,6 @@ class XEP_0115(BasePlugin): except XMPPError: return - # Only lookup the same caps once at a time. - with self._processing_lock: - if ver in self._processing: - log.debug('Already processing verstring %s' % ver) - return - self._processing.add(ver) - log.debug("New caps verification string: %s", ver) try: node = '%s#%s' % (pres['caps']['node'], ver) @@ -185,9 +173,6 @@ class XEP_0115(BasePlugin): except XMPPError: log.debug("Could not retrieve disco#info results for caps for %s", node) - with self._processing_lock: - self._processing.remove(ver) - def _validate_caps(self, caps, hash, check_verstring): # Check Identities full_ids = caps.get_identities(dedupe=False) |