summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2012-08-08 10:12:04 +0100
committerJonny Lamb <jonny.lamb@collabora.co.uk>2012-08-08 10:12:04 +0100
commit8af1530e4d240f241b802c81e8989d200fe354ad (patch)
treebe2b8f38aae444874d2261721fac31d393838c18
parent9c6bfbf802c17470e07b46dd6182bf28f185936b (diff)
downloadtelepathy-logger-8af1530e4d240f241b802c81e8989d200fe354ad.tar.gz
log-store-xml: remove usage of tp_account_parse_object_path
It's a shame we have to do this ourselves now, but it's probably the only user of it ever — most of the time you'll want to look at the 'account' Parameter. Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r--telepathy-logger/log-store-xml.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/telepathy-logger/log-store-xml.c b/telepathy-logger/log-store-xml.c
index a57bd84..c06b07d 100644
--- a/telepathy-logger/log-store-xml.c
+++ b/telepathy-logger/log-store-xml.c
@@ -1378,9 +1378,9 @@ log_store_xml_get_events_for_file (TplLogStoreXml *self,
gchar *dirname;
gchar *tmp;
gchar *target_id;
+ gchar **parts;
gchar *self_id;
GHashTable *supersedes_links;
- GError *error = NULL;
guint num_events = 0;
GList *index;
@@ -1396,16 +1396,18 @@ log_store_xml_get_events_for_file (TplLogStoreXml *self,
return;
}
- if (!tp_account_parse_object_path (
- tp_proxy_get_object_path (TP_PROXY (account)),
- NULL, NULL, &self_id, &error))
+ parts = g_strsplit (tp_proxy_get_object_path (account) +
+ strlen (TP_ACCOUNT_OBJECT_PATH_BASE), "/", 3);
+ if (g_strv_length (parts) != 3)
{
- DEBUG ("Cannot get self identifier from account: %s",
- error->message);
- g_error_free (error);
+ DEBUG ("Cannot get self identifier from account");
+ g_strfreev (parts);
return;
}
+ self_id = g_strdup (parts[2]);
+ g_strfreev (parts);
+
/* Create parser. */
ctxt = xmlNewParserCtxt ();