[tracker/journal: 11/13] libtracker-data: Fix IDs used for new ontology resources on replay
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/journal: 11/13] libtracker-data: Fix IDs used for new ontology resources on replay
- Date: Tue, 12 Oct 2010 10:17:22 +0000 (UTC)
commit 4b32863feac4022a5d4c4af624127fc12f11c945
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 8c3a067..821f948 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -1232,7 +1232,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;
@@ -1249,6 +1250,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;
+ }
}
}
@@ -2799,7 +2803,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]