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



Author: mr
Date: Tue Aug 12 17:01:09 2008
New Revision: 2064
URL: http://svn.gnome.org/viewvc/tracker?rev=2064&view=rev

Log:
	* src/trackerd/tracker-main.c: (main): Now shutdown the indexer
	when we shutdown.


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

Modified: branches/indexer-split/src/trackerd/tracker-main.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-main.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-main.c	Tue Aug 12 17:01:09 2008
@@ -896,23 +896,34 @@
 		g_main_loop_run (private->main_loop);
 	}
 
+#if 0
 	/* We can block on this since we are likely to block on
 	 * shutting down otherwise anyway.
 	 */
 	org_freedesktop_Tracker_Indexer_pause_for_duration (tracker_dbus_indexer_get_proxy (),
 							    2,
 							    NULL);
-
-	g_message ("Shutting down...\n");
+#endif
 
 	/* 
 	 * Shutdown the daemon
 	 */
+	g_message ("Shutdown started");
+
 	tracker_status_set_and_signal (TRACKER_STATUS_SHUTDOWN);
 
-	/* Set kill timeout */
 	g_timeout_add_full (G_PRIORITY_LOW, 5000, shutdown_timeout_cb, NULL, NULL);
 
+	g_message ("Waiting for indexer to finish");
+	org_freedesktop_Tracker_Indexer_shutdown (tracker_dbus_indexer_get_proxy (), &error);
+	
+	if (error) {
+		g_message ("Could not shutdown the indexer, %s", error->message);
+		g_message ("Continuing anyway...");
+		g_error_free (error);
+	}
+
+	g_message ("Cleaning up");
 	if (private->processor) {
 		/* We do this instead of let the private data free
 		 * itself later so we can clean up references to this
@@ -950,6 +961,8 @@
 
 	shutdown_locations ();
 
+	g_print ("\nOK\n\n");
+
 	return EXIT_SUCCESS;
 }
 



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