tracker r2159 - in branches/indexer-split: . src/trackerd



Author: pvanhoof
Date: Tue Aug 26 17:03:33 2008
New Revision: 2159
URL: http://svn.gnome.org/viewvc/tracker?rev=2159&view=rev

Log:

2008-08-26  Philip Van Hoof  <philip codeminded be>

        * src/trackerd/tracker-processor.c: a patch fix for the processor. It
        seems that a timeout that happens after the indexer has shut down
        calls its callback. That callback sets the status back to indexing.

        When Martyn is back from holiday he should take a look at this.



Modified:
   branches/indexer-split/ChangeLog
   branches/indexer-split/src/trackerd/tracker-processor.c

Modified: branches/indexer-split/src/trackerd/tracker-processor.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-processor.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-processor.c	Tue Aug 26 17:03:33 2008
@@ -87,6 +87,7 @@
 
 	gboolean        interrupted; 
 	gboolean        finished;
+	gboolean        indexer_shut_down;
 
 	/* Statistics */
 	guint           directories_found;
@@ -197,6 +198,7 @@
 
 	priv = object->private;
 
+	priv->indexer_shut_down = FALSE;
 	priv->modules = tracker_module_config_get_modules ();
 
 	/* For each module we create a TrackerCrawler and keep them in
@@ -588,7 +590,9 @@
 	}
 
 	/* Now we try to send items to the indexer */
-	tracker_status_set_and_signal (TRACKER_STATUS_INDEXING);
+	if (!processor->private->indexer_shut_down)
+		tracker_status_set_and_signal (TRACKER_STATUS_INDEXING);
+	processor->private->indexer_shut_down = FALSE;
 
 	/* This is here so we don't try to send something if we are
 	 * still waiting for a response from the last send.
@@ -1098,6 +1102,8 @@
 		   items_done);
 	g_free (str);
 
+	processor->private->indexer_shut_down = TRUE;
+
 	/* Do we even need this step Optimizing ? */
 	tracker_status_set_and_signal (TRACKER_STATUS_OPTIMIZING);
 



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