[tracker/journal: 13/21] libtracker-data: Drop do_callback param from cache_delete_resource_type



commit 7f69727c19e6a64dbb8cfafab6f484f1ccdf5519
Author: Jürg Billeter <j bitron ch>
Date:   Mon Mar 15 16:19:52 2010 +0100

    libtracker-data: Drop do_callback param from cache_delete_resource_type

 src/libtracker-data/tracker-data-update.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index 9875485..6979160 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -1328,8 +1328,7 @@ delete_metadata_decomposed (TrackerProperty  *property,
 static void
 cache_delete_resource_type (TrackerClass *class,
                             const gchar  *graph,
-                            gint          graph_id,
-                            gboolean      do_callback)
+                            gint          graph_id)
 {
 	TrackerDBInterface *iface;
 	TrackerDBStatement *stmt;
@@ -1370,7 +1369,7 @@ cache_delete_resource_type (TrackerClass *class,
 
 			tracker_db_result_set_get (result_set, 0, &class_uri, -1);
 			cache_delete_resource_type (tracker_ontologies_get_class_by_uri (class_uri),
-			                            graph, graph_id, do_callback);
+			                            graph, graph_id);
 			g_free (class_uri);
 		} while (tracker_db_result_set_iter_next (result_set));
 
@@ -1426,7 +1425,7 @@ cache_delete_resource_type (TrackerClass *class,
 
 	cache_delete_row (class);
 
-	if (do_callback && delete_callbacks) {
+	if (!in_journal_replay && delete_callbacks) {
 		guint n;
 		for (n = 0; n < delete_callbacks->len; n++) {
 			TrackerStatementDelegate *delegate;
@@ -1540,7 +1539,7 @@ tracker_data_delete_statement (const gchar  *graph,
 					query_resource_id (object));
 			}
 
-			cache_delete_resource_type (class, graph, 0, TRUE);
+			cache_delete_resource_type (class, graph, 0);
 		} else {
 			g_set_error (error, TRACKER_DATA_ERROR, TRACKER_DATA_ERROR_UNKNOWN_CLASS,
 			             "Class '%s' not found in the ontology", object);
@@ -2614,7 +2613,7 @@ tracker_data_replay_journal (GHashTable *classes,
 
 					class = tracker_ontologies_get_class_by_uri (object);
 					if (class != NULL) {
-						cache_delete_resource_type (class, NULL, graph_id, FALSE);
+						cache_delete_resource_type (class, NULL, graph_id);
 					} else {
 						g_warning ("Journal replay error: 'class with '%s' not found in the ontology'", object);
 					}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]