Re: please unblock Gajim-0.11
On Sun, Feb 11, 2007, Marc 'HE' Brockschmidt wrote:
> No. Sorry, but we are trying to do a release here. That means no new
> upstream version unless they are easily reviewable. This is not the case
> here. We would probably let in a fix for #410047 (as long as the patch
> is not too intrusive), but not the new upstream version.
I intend to upload a fix for #410047 backported from
http://trac.gajim.org/changeset/6606 to t-p-u (is DELAYED recommended
here to let the maintainer try to upload it himself?) as soon as I get
an ACK from the RM.
Here is the patch:
diff -u gajim-0.10.1/debian/changelog gajim-0.10.1/debian/changelog
--- gajim-0.10.1/debian/changelog
+++ gajim-0.10.1/debian/changelog
@@ -1,3 +1,12 @@
+gajim (0.10.1-6.1) testing-proposed-updates; urgency=low
+
+ * Non-maintainer upload.
+ * Backport patch from <http://trac.gajim.org/changeset/6606> to detect
+ loop when server isn't RFC complient and handles badly subscription
+ acknoledgment. (Closes: #410047)
+
+ -- Mohammed Adnène Trojette <adn+deb@diwi.org> Thu, 15 Feb 2007 17:56:24 +0100
+
gajim (0.10.1-6) unstable; urgency=low
* fix LDFLAGS problem. Closes: #384439
only in patch2:
unchanged:
--- gajim-0.10.1.orig/debian/patches/00_fix-infinite-dialog-popups.patch
+++ gajim-0.10.1/debian/patches/00_fix-infinite-dialog-popups.patch
@@ -0,0 +1,39 @@
+# Backporting http://trac.gajim.org/changeset/6606
+# Fixes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=410047
+
+Index: gajim-0.10.1/src/common/connection_handlers.py
+===================================================================
+--- gajim-0.10.1.orig/src/common/connection_handlers.py 2007-02-15 17:53:20.000000000 +0100
++++ gajim-0.10.1/src/common/connection_handlers.py 2007-02-15 17:54:55.000000000 +0100
+@@ -1051,6 +1051,9 @@
+ # keep the jids we auto added (transports contacts) to not send the
+ # SUBSCRIBED event to gui
+ self.automatically_added = []
++ # keep the latest subscribed event for each jid to prevent loop when we
++ # acknoledge presences
++ self.subscribed_events = {}
+ try:
+ idle.init()
+ except:
+@@ -1480,7 +1483,20 @@
+ if jid_stripped in self.automatically_added:
+ self.automatically_added.remove(jid_stripped)
+ else:
+- self.dispatch('SUBSCRIBED', (jid_stripped, resource))
++ # detect a subscription loop
++ if not self.subscribed_events.has_key(jid_stripped):
++ self.subscribed_events[jid_stripped] = []
++ self.subscribed_events[jid_stripped].append(time.time())
++ block = False
++ if len(self.subscribed_events[jid_stripped]) > 5:
++ if time.time() - self.subscribed_events[jid_stripped][0] < 5:
++ block = True
++ self.subscribed_events[jid_stripped] = self.subscribed_events[jid_stripped][1:]
++ if block:
++ gajim.config.set_per('account', self.name,
++ 'dont_ack_subscription', True)
++ else:
++ self.dispatch('SUBSCRIBED', (jid_stripped, resource))
+ # BE CAREFUL: no con.updateRosterItem() in a callback
+ gajim.log.debug(_('we are now subscribed to %s') % who)
+ elif ptype == 'unsubscribe':
--
Mohammed Adnène Trojette
Reply to: