Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.co.uk>2010-09-07 10:54:18 (GMT)
committer Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>2010-09-07 11:39:05 (GMT)
commitda758e1dbc2bb5e50b73a6f40f88a8e9818b9384 (patch)
treed786de49f27d5fbb7c5a8ae3c0533c6ae77dcc3d
parent885d118b31651bf381b40f6bf10cbd8b28cdc915 (diff)
Increase timeout for buddy properties queries #2298
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-rw-r--r--src/jarabe/model/neighborhood.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/jarabe/model/neighborhood.py b/src/jarabe/model/neighborhood.py
index 9ec6322..a457ff7 100644
--- a/src/jarabe/model/neighborhood.py
+++ b/src/jarabe/model/neighborhood.py
@@ -55,6 +55,12 @@ CONNECTION_INTERFACE_BUDDY_INFO = 'org.laptop.Telepathy.BuddyInfo'
CONNECTION_INTERFACE_ACTIVITY_PROPERTIES = \
'org.laptop.Telepathy.ActivityProperties'
+_QUERY_DBUS_TIMEOUT = 200
+"""
+Time in seconds to wait when querying contact properties. Some jabber servers
+will be very slow in returning these queries, so just be patient.
+"""
+
class ActivityModel(gobject.GObject):
__gsignals__ = {
'current-buddy-added': (gobject.SIGNAL_RUN_FIRST,
@@ -544,20 +550,23 @@ class _Account(gobject.GObject):
nick),
error_handler=partial(self.__error_handler_cb,
'BuddyInfo.GetProperties'),
- byte_arrays=True)
+ byte_arrays=True,
+ timeout=_QUERY_DBUS_TIMEOUT)
connection.GetActivities(
handle,
reply_handler=partial(self.__got_activities_cb, handle),
error_handler=partial(self.__error_handler_cb,
- 'BuddyInfo.GetActivities'))
+ 'BuddyInfo.GetActivities'),
+ timeout=_QUERY_DBUS_TIMEOUT)
connection.GetCurrentActivity(
handle,
reply_handler=partial(self.__get_current_activity_cb,
handle),
error_handler=partial(self.__error_handler_cb,
- 'BuddyInfo.GetCurrentActivity'))
+ 'BuddyInfo.GetCurrentActivity'),
+ timeout=_QUERY_DBUS_TIMEOUT)
else:
self.emit('buddy-added', contact_id, nick, None)