summaryrefslogtreecommitdiff
path: root/telepathy-logger
diff options
context:
space:
mode:
authorCosimo Alfarano <cosimo.alfarano@collabora.co.uk>2010-02-14 00:38:54 +0000
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2010-02-15 13:33:43 +1100
commitc481bb772babaafef81013abfefe9be19d674d4f (patch)
tree0f02d6fb1b0ba4afbbd58a4226445c72da06bea7 /telepathy-logger
parent83ec0a63f81eb59d39e2dd84569a3d0a3d590799 (diff)
downloadtelepathy-logger-c481bb772babaafef81013abfefe9be19d674d4f.tar.gz
Using tp_proxy_get_object_path
Diffstat (limited to 'telepathy-logger')
-rw-r--r--telepathy-logger/channel-text.c7
-rw-r--r--telepathy-logger/channel.c14
-rw-r--r--telepathy-logger/observer.c2
3 files changed, 14 insertions, 9 deletions
diff --git a/telepathy-logger/channel-text.c b/telepathy-logger/channel-text.c
index 20d3c0c..90f69a1 100644
--- a/telepathy-logger/channel-text.c
+++ b/telepathy-logger/channel-text.c
@@ -113,7 +113,6 @@ got_contact_cb (TpConnection *connection,
TplChannelTextPriv *priv = GET_PRIV (tpl_text);
TplChannel *tpl_chan = TPL_CHANNEL (tpl_text);
TpChannel *tp_chan = TP_CHANNEL (tpl_chan);
- gchar *conn_path;
g_return_if_fail (TPL_IS_CHANNEL_TEXT (tpl_text));
@@ -123,8 +122,10 @@ got_contact_cb (TpConnection *connection,
if (n_failed > 0)
{
- g_object_get (G_OBJECT (tp_channel_borrow_connection
- (tp_chan)), "object-path", &conn_path, NULL);
+ TpConnection *tp_conn = tp_channel_borrow_connection (tp_chan);
+ gchar *conn_path;
+
+ conn_path = g_strdup (tp_proxy_get_object_path (TP_PROXY (tp_conn)));
CHAN_DEBUG (tpl_text, "Error resolving self handle for connection %s."
" Aborting channel observation", conn_path);
diff --git a/telepathy-logger/channel.c b/telepathy-logger/channel.c
index 6098f88..5419acd 100644
--- a/telepathy-logger/channel.c
+++ b/telepathy-logger/channel.c
@@ -252,15 +252,18 @@ got_ready_tp_connection_cb (TpConnection *connection,
gpointer user_data)
{
TplActionChain *ctx = user_data;
- TplChannel *tpl_chan = tpl_actionchain_get_object (ctx);
- const gchar *chan_path;
if (error != NULL)
{
- chan_path = tp_proxy_get_object_path (TP_PROXY (tpl_chan));
+ gchar *chan_path;
+ TplChannel *tpl_chan;
+
+ tpl_chan = tpl_actionchain_get_object (ctx);
+ chan_path = g_strdup (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;
@@ -290,14 +293,15 @@ got_ready_tp_channel_cb (TpChannel *channel,
if (error != NULL)
{
- const gchar *chan_path;
+ gchar *chan_path;
TpConnection *tp_conn;
tp_conn = tp_channel_borrow_connection (TP_CHANNEL (channel));
- chan_path = tp_proxy_get_object_path (TP_PROXY (tp_conn));
+ chan_path = g_strdup (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 6eaee87..43ef089 100644
--- a/telepathy-logger/observer.c
+++ b/telepathy-logger/observer.c
@@ -586,7 +586,7 @@ tpl_observer_unregister_channel (TplObserver *self,
g_return_val_if_fail (TPL_IS_CHANNEL (channel), FALSE);
g_return_val_if_fail (glob_map != NULL, FALSE);
- g_object_get (G_OBJECT (channel), "object-path", &key, NULL);
+ key = g_strdup (tp_proxy_get_object_path (TP_PROXY (channel)));
DEBUG ("Unregistering channel path %s", key);