tracker r2545 - in trunk: . src/tracker-indexer



Author: mr
Date: Fri Nov 21 15:58:34 2008
New Revision: 2545
URL: http://svn.gnome.org/viewvc/tracker?rev=2545&view=rev

Log:
	* src/tracker-indexer/tracker-indexer.c: (tracker_indexer_init):
	Set the state initially to _STOPPED. The problem was, if the
	indexer was told to do something other than process files, it was
	sending the FINISHED signal even though no files had been
	processed. Setting the state to stopped initially means, the
	process_func() is only set up if state = 0, for that, it has to
	NOT be stopped and NOT have other factors like low battery or low
	disk space.


Modified:
   trunk/ChangeLog
   trunk/src/tracker-indexer/tracker-indexer.c

Modified: trunk/src/tracker-indexer/tracker-indexer.c
==============================================================================
--- trunk/src/tracker-indexer/tracker-indexer.c	(original)
+++ trunk/src/tracker-indexer/tracker-indexer.c	Fri Nov 21 15:58:34 2008
@@ -826,10 +826,20 @@
 
 	priv = indexer->private = TRACKER_INDEXER_GET_PRIVATE (indexer);
 
+	/* NOTE: We set this to stopped because it is likely the
+	 * daemon sends a request for something other than to check
+	 * files initially and we don't want to signal finished and
+	 * have the process func in use with nothing in any of the
+	 * queues. When we get files, this flag is unset.
+	 */
+	priv->state = TRACKER_INDEXER_STATE_STOPPED;
+
 	priv->items_processed = 0;
 	priv->in_transaction = FALSE;
+
 	priv->dir_queue = g_queue_new ();
 	priv->file_queue = g_queue_new ();
+
 	priv->mtime_cache = g_hash_table_new_full (g_str_hash,
 						   g_str_equal,
 						   g_free,



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