[next] telepathy-glib: TpAccountManager: simplify restart logic now that the AM is activatable
Simon McVittie
smcv at kemper.freedesktop.org
Mon Nov 11 12:14:03 PST 2013
Module: telepathy-glib
Branch: next
Commit: 7e3ae0c0d58ad6c163b3ba83c15cedf430228a1c
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=7e3ae0c0d58ad6c163b3ba83c15cedf430228a1c
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Tue Nov 5 12:52:31 2013 +0000
TpAccountManager: simplify restart logic now that the AM is activatable
This also fixes a bug: the name of the AM for Telepathy1 is
MissionControl6, not MissionControl5.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71262
Reviewed-by: Xavier Claessens <xavier.claessens at collabora.co.uk>
---
telepathy-glib/account-manager.c | 25 +++++--------------------
1 files changed, 5 insertions(+), 20 deletions(-)
diff --git a/telepathy-glib/account-manager.c b/telepathy-glib/account-manager.c
index daf0517..5a7b39d 100644
--- a/telepathy-glib/account-manager.c
+++ b/telepathy-glib/account-manager.c
@@ -129,8 +129,6 @@ typedef struct {
GArray *features;
} TpAccountManagerFeatureCallback;
-#define MC5_BUS_NAME "im.telepathy1.MissionControl5"
-
enum {
ACCOUNT_USABILITY_CHANGED,
ACCOUNT_REMOVED,
@@ -219,21 +217,9 @@ tp_account_manager_init (TpAccountManager *self)
}
static void
-_tp_account_manager_start_mc5 (TpDBusDaemon *bus)
+_tp_account_manager_start (TpAccountManager *self)
{
- TpProxy *mc5_proxy;
-
- /* trigger MC5 starting */
- mc5_proxy = g_object_new (TP_TYPE_PROXY,
- "dbus-daemon", bus,
- "dbus-connection", tp_proxy_get_dbus_connection (TP_PROXY (bus)),
- "bus-name", MC5_BUS_NAME,
- "object-path", "/",
- NULL);
-
- tp_cli_dbus_peer_call_ping (mc5_proxy, -1, NULL, NULL, NULL, NULL);
-
- g_object_unref (mc5_proxy);
+ tp_cli_dbus_peer_call_ping (self, -1, NULL, NULL, NULL, NULL);
}
static void
@@ -246,9 +232,8 @@ _tp_account_manager_name_owner_cb (TpDBusDaemon *proxy,
if (tp_str_empty (new_owner))
{
- /* MC5 quit or crashed for some reason, let's start it again */
- _tp_account_manager_start_mc5 (proxy);
- return;
+ /* AM quit or crashed for some reason, let's start it again */
+ _tp_account_manager_start (user_data);
}
}
@@ -1337,5 +1322,5 @@ tp_account_manager_enable_restart (TpAccountManager *manager)
TP_ACCOUNT_MANAGER_BUS_NAME, _tp_account_manager_name_owner_cb,
manager, NULL);
- _tp_account_manager_start_mc5 (tp_proxy_get_dbus_daemon (manager));
+ _tp_account_manager_start (manager);
}
More information about the telepathy-commits
mailing list