[tracker] libtracker-data: Fix IDs used for new ontology resources on replay
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Fix IDs used for new ontology resources on replay
- Date: Mon, 25 Oct 2010 12:53:42 +0000 (UTC)
commit 54cf3965ca07f101e37561e8197e67f7ce17da1d
Author: Jürg Billeter <j bitron ch>
Date: Tue Oct 12 10:40:05 2010 +0200
libtracker-data: Fix IDs used for new ontology resources on replay
src/libtracker-data/tracker-data-manager.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 6c90cc5..28c5e0e 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -1236,7 +1236,8 @@ get_ontology_from_path (const gchar *ontology_path)
}
static void
-load_ontology_ids_from_journal (GHashTable **uri_id_map_out)
+load_ontology_ids_from_journal (GHashTable **uri_id_map_out,
+ gint *max_id)
{
GHashTable *uri_id_map;
@@ -1253,6 +1254,9 @@ load_ontology_ids_from_journal (GHashTable **uri_id_map_out)
tracker_db_journal_reader_get_resource (&id, &uri);
g_hash_table_insert (uri_id_map, g_strdup (uri), GINT_TO_POINTER (id));
+ if (id > *max_id) {
+ *max_id = id;
+ }
}
}
@@ -2808,7 +2812,7 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
tracker_db_journal_reader_ontology_init (NULL);
/* Load ontology IDs from journal into memory */
- load_ontology_ids_from_journal (&uri_id_map);
+ load_ontology_ids_from_journal (&uri_id_map, &max_id);
tracker_db_journal_reader_shutdown ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]