diff options
author | Cosimo Alfarano <cosimo.alfarano@collabora.co.uk> | 2010-02-12 19:17:47 +0000 |
---|---|---|
committer | Cosimo Alfarano <cosimo.alfarano@collabora.co.uk> | 2010-02-12 19:26:07 +0000 |
commit | f98202be757469238c311aa952fd3d01f40bd69b (patch) | |
tree | 557af902d47d2becb007a8ac8003dd2bce12547f | |
parent | 0afec9f70bf205f05d75f08f7a2f0ddd2ba821ba (diff) |
use tp_proxy_get_object_path()
-rw-r--r-- | telepathy-logger/channel.c | 12 | ||||
-rw-r--r-- | telepathy-logger/observer.c | 2 |
2 files changed, 6 insertions, 8 deletions
diff --git a/telepathy-logger/channel.c b/telepathy-logger/channel.c index e3b981336..cc524d0fe 100644 --- a/telepathy-logger/channel.c +++ b/telepathy-logger/channel.c @@ -248,15 +248,14 @@ got_ready_tp_connection_cb (TpConnection *connection, { TplActionChain *ctx = user_data; TplChannel *tpl_chan = tpl_actionchain_get_object (ctx); - gchar *chan_path; + const gchar *chan_path; if (error != NULL) { - g_object_get (G_OBJECT (tpl_chan), "object-path", &chan_path, NULL); + chan_path = tp_proxy_get_object_path (TP_PROXY (tpl_chan)); DEBUG ("%s. Giving up channel '%s' observation", error->message, chan_path); - g_free (chan_path); g_object_unref (tpl_chan); tpl_actionchain_terminate (ctx); return; @@ -286,15 +285,14 @@ got_ready_tp_channel_cb (TpChannel *channel, if (error != NULL) { - gchar *chan_path; + const gchar *chan_path; TpConnection *tp_conn; - g_object_get (channel, "connection", &tp_conn, NULL); - g_object_get (G_OBJECT (channel), "object-path", &chan_path, NULL); + tp_conn = tp_channel_borrow_connection (TP_CHANNEL (channel)); + chan_path = tp_proxy_get_object_path (TP_PROXY (tp_conn)); DEBUG ("%s. Giving up channel '%s' observation", error->message, chan_path); - g_free (chan_path); g_object_unref (tpl_chan); g_object_unref (tp_conn); tpl_actionchain_terminate (ctx); diff --git a/telepathy-logger/observer.c b/telepathy-logger/observer.c index 33b769e43..7e0ce852d 100644 --- a/telepathy-logger/observer.c +++ b/telepathy-logger/observer.c @@ -529,7 +529,7 @@ tpl_observer_register_channel (TplObserver *self, g_return_val_if_fail (glob_map != NULL, FALSE); /* 'key' will be freed by the hash table on key removal/destruction */ - g_object_get (G_OBJECT (channel), "object-path", &key, NULL); + key = g_strdup (tp_proxy_get_object_path (G_OBJECT (channel))); if (g_hash_table_lookup (glob_map, key) != NULL) { |