summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-06-23 12:15:02 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-06-23 12:43:22 +0200
commit468385b3e584f0fd6e6431651401f4908564e3bb (patch)
tree7bb497f83a2d3348a41610b1b0bd35be8253f26b
parent2d5093ec7ac2b9f6995f7fe6952e5d03df4cc00e (diff)
log-store-xml: reuse existing TpAccount instead of creating a new one (fdo #28682)
-rw-r--r--telepathy-logger/entry.h1
-rw-r--r--telepathy-logger/log-store-xml.c10
2 files changed, 2 insertions, 9 deletions
diff --git a/telepathy-logger/entry.h b/telepathy-logger/entry.h
index 188866f..ed35330 100644
--- a/telepathy-logger/entry.h
+++ b/telepathy-logger/entry.h
@@ -53,6 +53,7 @@ typedef enum
gint64 tpl_entry_get_timestamp (TplEntry *self);
const gchar *tpl_entry_get_account_path (TplEntry *self);
+TpAccount * tpl_entry_get_account (TplEntry *self);
TplEntity * tpl_entry_get_sender (TplEntry *self);
TplEntity * tpl_entry_get_receiver (TplEntry *self);
diff --git a/telepathy-logger/log-store-xml.c b/telepathy-logger/log-store-xml.c
index cbe5cf2..61228b3 100644
--- a/telepathy-logger/log-store-xml.c
+++ b/telepathy-logger/log-store-xml.c
@@ -447,13 +447,7 @@ add_message_text_chat (TplLogStoreXml *self,
goto out;
}
- account = tp_account_new (bus_daemon,
- tpl_entry_get_account_path (TPL_ENTRY (message)), error);
- if (account == NULL)
- {
- DEBUG ("Error acquiring TpAccount proxy: %s", (*error)->message);
- goto out;
- }
+ account = tpl_entry_get_account (TPL_ENTRY (message));
body_str = tpl_entry_text_get_message (message);
if (TPL_STR_EMPTY (body_str))
@@ -502,8 +496,6 @@ out:
if (bus_daemon != NULL)
g_object_unref (bus_daemon);
- if (account != NULL)
- g_object_unref (account);
return ret;
}