aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-debug-dialog.c
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2009-04-20 21:40:24 +0800
committerJonny Lamb <jonny.lamb@collabora.co.uk>2009-04-24 08:52:48 +0800
commit9de1a3a667851d39f82a5b2aa21af6620750a10d (patch)
tree64de77da0c1aef7596180e0ee5af1b506f0d83df /src/empathy-debug-dialog.c
parent810744148160705f76412551b28daadaf7d29da8 (diff)
downloadgsoc2013-empathy-9de1a3a667851d39f82a5b2aa21af6620750a10d.tar
gsoc2013-empathy-9de1a3a667851d39f82a5b2aa21af6620750a10d.tar.gz
gsoc2013-empathy-9de1a3a667851d39f82a5b2aa21af6620750a10d.tar.bz2
gsoc2013-empathy-9de1a3a667851d39f82a5b2aa21af6620750a10d.tar.lz
gsoc2013-empathy-9de1a3a667851d39f82a5b2aa21af6620750a10d.tar.xz
gsoc2013-empathy-9de1a3a667851d39f82a5b2aa21af6620750a10d.tar.zst
gsoc2013-empathy-9de1a3a667851d39f82a5b2aa21af6620750a10d.zip
Get the CM bus name from the TpProxy instead of hard-coding, and fix some ref problems.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'src/empathy-debug-dialog.c')
-rw-r--r--src/empathy-debug-dialog.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/empathy-debug-dialog.c b/src/empathy-debug-dialog.c
index 754d9bc11..a7db82b57 100644
--- a/src/empathy-debug-dialog.c
+++ b/src/empathy-debug-dialog.c
@@ -212,6 +212,7 @@ debug_dialog_account_chooser_changed_cb (GtkComboBox *account_chooser,
MissionControl *mc;
TpDBusDaemon *dbus;
GError *error = NULL;
+ const gchar *bus_name;
mc = empathy_mission_control_dup_singleton ();
account = empathy_account_chooser_get_account (EMPATHY_ACCOUNT_CHOOSER (account_chooser));
@@ -221,22 +222,26 @@ debug_dialog_account_chooser_changed_cb (GtkComboBox *account_chooser,
{
DEBUG ("Getting the account's TpConnection failed: %s", error->message);
g_error_free (error);
+ g_object_unref (account);
+ g_object_unref (mc);
return;
}
- dbus = g_object_ref (tp_proxy_get_dbus_daemon (connection));
+ dbus = tp_proxy_get_dbus_daemon (connection);
+ bus_name = tp_proxy_get_bus_name (connection);
+ g_object_unref (connection);
/* TODO: Fix this. */
- connection = tp_connection_new (dbus,
- "org.freedesktop.Telepathy.ConnectionManager.gabble",
- "/org/freedesktop/Telepathy/debug",
- &error);
+ connection = tp_connection_new (dbus, bus_name,
+ "/org/freedesktop/Telepathy/debug", &error);
if (error != NULL)
{
DEBUG ("Getting a new TpConnection failed: %s", error->message);
g_error_free (error);
g_object_unref (dbus);
+ g_object_unref (account);
+ g_object_unref (mc);
return;
}
@@ -254,14 +259,14 @@ debug_dialog_account_chooser_changed_cb (GtkComboBox *account_chooser,
if (priv->proxy)
g_object_unref (priv->proxy);
- priv->proxy = TP_PROXY (g_object_ref (connection));
+ priv->proxy = TP_PROXY (connection);
emp_cli_debug_call_get_messages (priv->proxy, -1,
debug_dialog_get_messages_cb, debug_dialog, NULL, NULL);
- g_object_unref (connection);
- g_object_unref (account);
g_object_unref (dbus);
+ g_object_unref (account);
+ g_object_unref (mc);
}
static void