[tracker/class-signal] tracker-store: Simplofy reset of writeback, removed unused code



commit 8c646186705c26cc29064737455a21d0ecec8959
Author: Philip Van Hoof <philip codeminded be>
Date:   Fri Aug 27 13:22:25 2010 +0200

    tracker-store: Simplofy reset of writeback, removed unused code

 src/tracker-store/tracker-writeback.c |   29 +++++------------------------
 src/tracker-store/tracker-writeback.h |    1 -
 2 files changed, 5 insertions(+), 25 deletions(-)
---
diff --git a/src/tracker-store/tracker-writeback.c b/src/tracker-store/tracker-writeback.c
index 6090831..4d58dbd 100644
--- a/src/tracker-store/tracker-writeback.c
+++ b/src/tracker-store/tracker-writeback.c
@@ -95,29 +95,6 @@ tracker_writeback_check (gint         graph_id,
 }
 
 void
-tracker_writeback_reset (void)
-{
-	g_return_if_fail (private != NULL);
-
-	if (private->pending_events && private->ready_events) {
-		GHashTableIter iter;
-		gpointer key, value;
-
-		g_hash_table_iter_init (&iter, private->pending_events);
-
-		while (g_hash_table_iter_next (&iter, &key, &value)) {
-			g_hash_table_insert (private->ready_events, key, value);
-			g_hash_table_iter_remove (&iter);
-		}
-		g_hash_table_unref (private->ready_events);
-		g_hash_table_unref (private->pending_events);
-
-		private->ready_events = NULL;
-		private->pending_events = NULL;
-	}
-}
-
-void
 tracker_writeback_reset_pending ()
 {
 	g_return_if_fail (private != NULL);
@@ -218,7 +195,11 @@ tracker_writeback_shutdown (void)
 {
 	g_return_if_fail (private != NULL);
 
-	tracker_writeback_reset ();
+	/* Perhaps hurry an emit of the ready events here? We're shutting down,
+	 * so I guess we're not required to do that here ... ? */
+	tracker_writeback_reset_ready ();
+
+	tracker_writeback_reset_pending ();
 	free_private (private);
 	private = NULL;
 }
diff --git a/src/tracker-store/tracker-writeback.h b/src/tracker-store/tracker-writeback.h
index b52842e..2fecdee 100644
--- a/src/tracker-store/tracker-writeback.h
+++ b/src/tracker-store/tracker-writeback.h
@@ -42,7 +42,6 @@ void        tracker_writeback_check         (gint         graph_id,
 GHashTable* tracker_writeback_get_ready     (void);
 void        tracker_writeback_reset_pending (void);
 void        tracker_writeback_reset_ready   (void);
-void        tracker_writeback_reset         (void);
 void        tracker_writeback_transact      (void);
 
 G_END_DECLS



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