summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-07-14 14:52:09 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-11 11:24:59 +0200
commit20919a8f6a2b4c997bb77c9d8bd8ee176978207e (patch)
tree37c6a1a305a452d299916d29c37d3f6da9211b8d
parenta682d5f16729441a56affa947637987243f853ed (diff)
downloadtelepathy-logger-20919a8f6a2b4c997bb77c9d8bd8ee176978207e.tar.gz
tpl_log_store_sqlite_get_chats: use _tpl_log_manager_search_hit_new
Also set the account of the hit.
-rw-r--r--telepathy-logger/log-store-sqlite.c7
1 files 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);
}