aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-09-13 23:57:48 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-09-14 00:45:01 +0800
commit6d7f7edd8ee8290d0e07441523d6c9e44ed0a38d (patch)
treedab4940cf7dcb1745fe5904b89feb763c4809f2c
parentc558a5ee937d50332885003c87a1b8c8520a412a (diff)
downloadgsoc2013-empathy-6d7f7edd8ee8290d0e07441523d6c9e44ed0a38d.tar
gsoc2013-empathy-6d7f7edd8ee8290d0e07441523d6c9e44ed0a38d.tar.gz
gsoc2013-empathy-6d7f7edd8ee8290d0e07441523d6c9e44ed0a38d.tar.bz2
gsoc2013-empathy-6d7f7edd8ee8290d0e07441523d6c9e44ed0a38d.tar.lz
gsoc2013-empathy-6d7f7edd8ee8290d0e07441523d6c9e44ed0a38d.tar.xz
gsoc2013-empathy-6d7f7edd8ee8290d0e07441523d6c9e44ed0a38d.tar.zst
gsoc2013-empathy-6d7f7edd8ee8290d0e07441523d6c9e44ed0a38d.zip
When getting messages for a file, pass the account as we already know it
-rw-r--r--libempathy/empathy-log-store-empathy.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/libempathy/empathy-log-store-empathy.c b/libempathy/empathy-log-store-empathy.c
index 9963bfc44..69cbab7f8 100644
--- a/libempathy/empathy-log-store-empathy.c
+++ b/libempathy/empathy-log-store-empathy.c
@@ -441,6 +441,7 @@ log_store_empathy_search_hit_new (EmpathyLogStore *self,
static GList *
log_store_empathy_get_messages_for_file (EmpathyLogStore *self,
+ EmpathyAccount *account,
const gchar *filename)
{
GList *messages = NULL;
@@ -448,8 +449,6 @@ log_store_empathy_get_messages_for_file (EmpathyLogStore *self,
xmlDocPtr doc;
xmlNodePtr log_node;
xmlNodePtr node;
- EmpathyLogSearchHit *hit;
- EmpathyAccount *account;
g_return_val_if_fail (EMPATHY_IS_LOG_STORE (self), NULL);
g_return_val_if_fail (filename != NULL, NULL);
@@ -462,17 +461,6 @@ log_store_empathy_get_messages_for_file (EmpathyLogStore *self,
return NULL;
}
- /* Get the account from the filename */
- hit = log_store_empathy_search_hit_new (self, filename);
-
- if (hit->account != NULL)
- account = g_object_ref (hit->account);
-
- empathy_log_manager_search_hit_free (hit);
-
- if (hit->account == NULL)
- return NULL;
-
/* Create parser. */
ctxt = xmlNewParserCtxt ();
@@ -731,10 +719,12 @@ log_store_empathy_get_messages_for_date (EmpathyLogStore *self,
g_return_val_if_fail (EMPATHY_IS_LOG_STORE (self), NULL);
g_return_val_if_fail (chat_id != NULL, NULL);
+ g_return_val_if_fail (account != NULL, NULL);
filename = log_store_empathy_get_filename_for_date (self, account,
chat_id, chatroom, date);
- messages = log_store_empathy_get_messages_for_file (self, filename);
+ messages = log_store_empathy_get_messages_for_file (self, account,
+ filename);
g_free (filename);
return messages;