[next] telepathy-logger: log-store-xml: remove usage of tp_account_parse_object_path
Jonny Lamb
jonny at kemper.freedesktop.org
Wed Aug 8 03:41:17 PDT 2012
Module: telepathy-logger
Branch: next
Commit: 8af1530e4d240f241b802c81e8989d200fe354ad
URL: http://cgit.freedesktop.org/telepathy/telepathy-logger/commit/?id=8af1530e4d240f241b802c81e8989d200fe354ad
Author: Jonny Lamb <jonny.lamb at collabora.co.uk>
Date: Wed Aug 8 10:12:04 2012 +0100
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 at collabora.co.uk>
---
telepathy-logger/log-store-xml.c | 16 +++++++++-------
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 ();
More information about the telepathy-commits
mailing list