[tracker/clientapi] Bugfix for previous commit (squash)



commit d67df5fe766cf3fdc25687401fd58997b2f0ad38
Author: Philip Van Hoof <philip codeminded be>
Date:   Wed Jan 13 19:19:53 2010 +0100

    Bugfix for previous commit (squash)

 src/plugins/evolution/tracker-evolution-plugin.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/plugins/evolution/tracker-evolution-plugin.c b/src/plugins/evolution/tracker-evolution-plugin.c
index 3d37f34..4670d45 100644
--- a/src/plugins/evolution/tracker-evolution-plugin.c
+++ b/src/plugins/evolution/tracker-evolution-plugin.c
@@ -373,12 +373,13 @@ pool_sort_func (gconstpointer a,
 }
 
 static ThreadPool*
-thread_pool_new (GFunc func, GFunc freeup)
+thread_pool_new (GFunc func, GFunc freeup, GCompareDataFunc sorter)
 {
 	ThreadPool *wrap = g_new0 (ThreadPool, 1);
 
 	wrap->pool = g_thread_pool_new (thread_pool_exec, wrap, 1, FALSE, NULL);
-	g_thread_pool_set_sort_function (wrap->pool, pool_sort_func, NULL);
+	if (sorter)
+		g_thread_pool_set_sort_function (wrap->pool, sorter, NULL);
 	wrap->items = NULL;
 	wrap->dying = FALSE;
 	wrap->func = func;
@@ -419,7 +420,7 @@ send_sparql_update (TrackerEvolutionPlugin *self, const gchar *sparql, gint prio
 		PoolItem *item = g_slice_new (PoolItem);
 
 		if (!sparql_pool)
-			sparql_pool = thread_pool_new (exec_update, free_pool_item);
+			sparql_pool = thread_pool_new (exec_update, free_pool_item, pool_sort_func);
 
 		item->prio = prio;
 		item->commit = FALSE;
@@ -452,7 +453,7 @@ send_sparql_commit (TrackerEvolutionPlugin *self, gboolean update)
 		}
 
 		if (!sparql_pool)
-			sparql_pool = thread_pool_new (exec_update, free_pool_item);
+			sparql_pool = thread_pool_new (exec_update, free_pool_item, pool_sort_func);
 
 		item->prio = 0;
 		item->commit = TRUE;
@@ -1466,7 +1467,7 @@ try_again (gpointer user_data)
 		winfo->cdb_r = info->cdb_r; /* owner transfer */
 
 		if (!folder_pool)
-			folder_pool = thread_pool_new (folder_worker, free_worker_thread_info);
+			folder_pool = thread_pool_new (folder_worker, free_worker_thread_info, NULL);
 
 		thread_pool_push (folder_pool, winfo, NULL);
 
@@ -2241,6 +2242,7 @@ miner_paused (TrackerMiner *miner)
 	                                miner);
 
 	priv->paused = TRUE;
+	priv->last_time = 0;
 
 	if (priv->client) {
 		TrackerClient *client = priv->client;



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