From 20919a8f6a2b4c997bb77c9d8bd8ee176978207e Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 14 Jul 2010 14:52:09 +0200 Subject: tpl_log_store_sqlite_get_chats: use _tpl_log_manager_search_hit_new Also set the account of the hit. --- telepathy-logger/log-store-sqlite.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/telepathy-logger/log-store-sqlite.c b/telepathy-logger/log-store-sqlite.c index 1c8b149..d38a8b6 100644 --- a/telepathy-logger/log-store-sqlite.c +++ b/telepathy-logger/log-store-sqlite.c @@ -30,6 +30,7 @@ #include "entry-text.h" #include "entry-text-internal.h" #include "log-store-sqlite-internal.h" +#include "log-manager-internal.h" #define DEBUG_FLAG TPL_DEBUG_LOG_STORE #include "datetime-internal.h" @@ -1144,7 +1145,7 @@ tpl_log_store_sqlite_get_chats (TplLogStore *self, while ((e = sqlite3_step (sql)) == SQLITE_ROW) { - TplLogSearchHit *hit = g_slice_new0 (TplLogSearchHit); + TplLogSearchHit *hit; const char *identifier; gboolean chatroom; @@ -1154,8 +1155,8 @@ tpl_log_store_sqlite_get_chats (TplLogStore *self, DEBUG ("identifier = %s, chatroom = %i", identifier, chatroom); - hit->chat_id = g_strdup (identifier); - hit->is_chatroom = chatroom; + hit = _tpl_log_manager_search_hit_new (account, identifier, chatroom, + NULL, NULL); list = g_list_prepend (list, hit); } -- cgit v1.2.1