aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-07-08 01:45:40 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-07-08 02:39:35 +0800
commit26ece7454d44593b406853da122da92c4daf53a2 (patch)
tree4ae813f2dc832a2a2a171e5cecb885ed68922381 /modules
parentb0278b2eea22e06b7f04e9614c368de1bd778672 (diff)
downloadgsoc2013-evolution-26ece7454d44593b406853da122da92c4daf53a2.tar.gz
gsoc2013-evolution-26ece7454d44593b406853da122da92c4daf53a2.tar.zst
gsoc2013-evolution-26ece7454d44593b406853da122da92c4daf53a2.zip
connman: Recover from dropped D-Bus connections faster.
Diffstat (limited to 'modules')
-rw-r--r--modules/connman/evolution-connman.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/connman/evolution-connman.c b/modules/connman/evolution-connman.c
index 0a320a1f6c..f6225df46c 100644
--- a/modules/connman/evolution-connman.c
+++ b/modules/connman/evolution-connman.c
@@ -67,17 +67,24 @@ extension_set_state (EConnMan *extension,
}
static void
-connman_connection_closed_cb (GDBusConnection *pconnection,
+connman_connection_closed_cb (GDBusConnection *connection,
gboolean remote_peer_vanished,
GError *error,
- gpointer user_data)
+ EConnMan *extension)
{
- EConnMan *extension = user_data;
+ gboolean try_again;
g_object_unref (extension->connection);
extension->connection = NULL;
- g_timeout_add_seconds (3, (GSourceFunc) connman_connect, extension);
+ /* Try connecting to the session bus immediately, and then
+ * keep trying at 3 second intervals until we're back on. */
+
+ try_again = connman_connect (extension);
+
+ if (try_again)
+ g_timeout_add_seconds (
+ 3, (GSourceFunc) connman_connect, extension);
}
static void