From 48af9872f5168045ef1fb1a03993a1db4ec68f1a Mon Sep 17 00:00:00 2001 From: Stefan Bethge <stefan@lanpartei.de> Date: Fri, 29 Sep 2006 00:14:04 +0000 Subject: [PATCH] ignore Timeout reached errors, otherwise connection breaks, fix dragging of files to local contacts --- src/common/zeroconf/zeroconf.py | 6 ++++-- src/roster_window.py | 10 +++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/common/zeroconf/zeroconf.py b/src/common/zeroconf/zeroconf.py index fef1187ae5..0924b08698 100755 --- a/src/common/zeroconf/zeroconf.py +++ b/src/common/zeroconf/zeroconf.py @@ -67,8 +67,10 @@ class Zeroconf: def error_callback(self, err): gajim.log.debug(str(err)) - self.disconnect() - self.disconnected_CB() + # timeouts are non-critical + if str(err) != 'Timeout reached': + self.disconnect() + self.disconnected_CB() def new_service_callback(self, interface, protocol, name, stype, domain, flags): gajim.log.debug('Found service %s in domain %s on %i.%i.' % (name, domain, interface, protocol)) diff --git a/src/roster_window.py b/src/roster_window.py index d2df47b8ff..0d623b39c1 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -3584,11 +3584,7 @@ _('If "%s" accepts this request you will know his or her status.') % jid) if account_dest == 'all': # drop on account row in merged mode: we can't know which account it is return - - if account_dest == gajim.ZEROCONF_ACC_NAME: - # drop on zeroconf account, no contact adds possible - return - + # if account is not connected, do nothing if gajim.connections[account_dest].connected < 2: return @@ -3614,6 +3610,10 @@ _('If "%s" accepts this request you will know his or her status.') % jid) account_dest, c_dest, path) return + if account_dest == gajim.ZEROCONF_ACC_NAME: + # drop on zeroconf account, no contact adds possible + return + if position == gtk.TREE_VIEW_DROP_BEFORE and len(path_dest) == 2: # dropped before a group : we drop it in the previous group path_dest = (path_dest[0], path_dest[1]-1) -- GitLab