From 6739e0b19046ade6de731b30cd98cb770340479f Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 13 Oct 2004 22:51:58 +0000 Subject: [PATCH] bugfixes in the last jabber.py --- common/jabber.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/jabber.py b/common/jabber.py index cf3b477c2..baeee95b1 100644 --- a/common/jabber.py +++ b/common/jabber.py @@ -260,7 +260,7 @@ class Connection(xmlstream.Client): """Called internally when a 'protocol element' is received. Builds the relevant jabber.py object and dispatches it to a relevant function or callback.""" - self.lastIncome = time.time() + self._lastIncome = time.time() name=stanza.getName() if not self.handlers.has_key(name): self.DEBUG("whats a tag -> " + name,DBG_NODE_UNKNOWN) @@ -281,6 +281,7 @@ class Connection(xmlstream.Client): typns=typ+ns if not self.handlers[name].has_key(ns): ns='' if not self.handlers[name].has_key(typ): typ='' + if not self.handlers[name].has_key(typns): typns='' if typ and ns and not self.handlers[name].has_key(typns): typns='' chain=[] @@ -412,7 +413,7 @@ class Connection(xmlstream.Client): return ustr(self._id) def process(self, timeout=0): - if time.time() > self._lastIncome + timeout: + if time.time() > self._lastIncome + 300: self._lastIncome = time.time() iq = Iq(type="get", to=self._host, query=NS_LAST) print "iq", iq