[telepathy-mission-control/master] McdClientRegistry: don't kick the daemon, it makes it forget pending activations
Simon McVittie
simon.mcvittie at collabora.co.uk
Mon Oct 12 07:36:39 PDT 2009
This is essentially a forward-port of commit c51127c9 from master.
D-Bus forgets about all current activations when it's asked to reload its
configuration. This causes bad side-effects if MissionControl was in the
process of activating itself (and for everything else that's activating itself
on system startup).
The upstream D-Bus bug is fd.o#24350, this also reopens fd.o#23921
---
src/client-registry.c | 35 ++++++-----------------------------
1 files changed, 6 insertions(+), 29 deletions(-)
diff --git a/src/client-registry.c b/src/client-registry.c
index 09997ef..687e0fe 100644
--- a/src/client-registry.c
+++ b/src/client-registry.c
@@ -266,28 +266,6 @@ mcd_client_registry_list_activatable_names_cb (TpDBusDaemon *proxy,
}
static void
-mcd_client_registry_reload_config_cb (TpDBusDaemon *proxy,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- if (error != NULL)
- {
- DEBUG ("ReloadConfig returned error. Recent .service files may not "
- "be found: %s %d: %s",
- g_quark_to_string (error->domain), error->code, error->message);
- }
-
- tp_cli_dbus_daemon_call_list_activatable_names (proxy, -1,
- mcd_client_registry_list_activatable_names_cb,
- NULL, NULL, weak_object);
- /* deliberately not calling _mcd_client_registry_dec_startup_lock here -
- * this function is "lock-neutral", similarly to list_names_cb (we would
- * take a lock for ListActivatableNames then release the one used for
- * ReloadConfig), so simplify by doing nothing */
-}
-
-static void
mcd_client_registry_list_names_cb (TpDBusDaemon *proxy,
const gchar **names,
const GError *error,
@@ -314,14 +292,13 @@ mcd_client_registry_list_names_cb (TpDBusDaemon *proxy,
}
}
- /* Call reload config because the dbus daemon often fails to notice newly
- * installed .service files on its own. */
- tp_cli_dbus_daemon_call_reload_config (proxy, -1,
- mcd_client_registry_reload_config_cb, NULL, NULL, weak_object);
+ tp_cli_dbus_daemon_call_list_activatable_names (proxy, -1,
+ mcd_client_registry_list_activatable_names_cb,
+ NULL, NULL, weak_object);
/* deliberately not calling _mcd_client_registry_dec_startup_lock here -
- * this function is "lock-neutral" (we would take a lock for ReloadConfig
- * then release the one used for ListNames), so simplify by doing
- * nothing */
+ * this function is "lock-neutral", similarly to list_names_cb (we would
+ * take a lock for ListActivatableNames then release the one used for
+ * ReloadConfig), so simplify by doing nothing */
}
static void
--
1.5.6.5
More information about the telepathy-commits
mailing list