For some reason when that patch is used I get an error:

File "/usr/lib/python2.3/site-packages/twisted/words/xish/utility.py",
line 234, in dispatch
           callbacklist = self._xpathObservers[(priority, query)]
       exceptions.KeyError: (0, <twisted.words.xish.xpath.XPathQuery
instance at 0xb407eecc>)

This may have something to do with id attribute values being reused.

Anyway, a patch that fixes it is attached.

On 1/29/07, Jack Moffitt <[EMAIL PROTECTED]> wrote:
> Attached is a very small patch that fixes this problem as long as a
> response is received for the IQ stanza.  If no response is received,
> it still leaks, but I understand this is fixed by t.w.p.j.xmlstream.IQ
> using a timeout.  We'll switch to that soon, but this patch will help
> others who haven't.

Here is a second patch which is minor compared to the other.  It makes
client.IQ only addOnetimeObserver if the iq type is 'get' or 'set'.

Regards,
jack.


_______________________________________________
Twisted-Jabber mailing list
[email protected]
https://mailman.ik.nu/mailman/listinfo/twisted-jabber




--- utility.py  2007-01-29 16:03:14.000000000 -0600
+++ utility.py  2007-01-29 17:38:39.000000000 -0600
@@ -231,6 +231,8 @@
                     foundTarget = True
         else:
             for priority, query in self._orderedXpathObserverKeys:
+                if not self._xpathObservers.has_key((priority, query)):
+                    continue
                 callbacklist = self._xpathObservers[(priority, query)]
                 if query.matches(object):
                     callbacklist.callback(object)
_______________________________________________
Twisted-Jabber mailing list
[email protected]
https://mailman.ik.nu/mailman/listinfo/twisted-jabber

Reply via email to