tracker r1742 - in branches/indexer-split: . src/libtracker-db src/tracker-indexer src/trackerd



Author: pvanhoof
Date: Tue Jun 24 08:35:49 2008
New Revision: 1742
URL: http://svn.gnome.org/viewvc/tracker?rev=1742&view=rev

Log:
2008-06-24  Philip Van Hoof  <pvanhoof gnome org>

        * src/tracker-indexer/tracker-main.c:
        * src/trackerd/tracker-main.c:
        * src/libtracker-db/tracker-db-manager.c:
        * src/libtracker-db/tracker-db-manager.h:

        tracker_db_manager_shutdown must not remove the directory in tmp with
        cache.db in case the indexer calls it.



Modified:
   branches/indexer-split/ChangeLog
   branches/indexer-split/src/libtracker-db/tracker-db-manager.c
   branches/indexer-split/src/libtracker-db/tracker-db-manager.h
   branches/indexer-split/src/tracker-indexer/tracker-main.c
   branches/indexer-split/src/trackerd/tracker-main.c

Modified: branches/indexer-split/src/libtracker-db/tracker-db-manager.c
==============================================================================
--- branches/indexer-split/src/libtracker-db/tracker-db-manager.c	(original)
+++ branches/indexer-split/src/libtracker-db/tracker-db-manager.c	Tue Jun 24 08:35:49 2008
@@ -2374,7 +2374,7 @@
 }
 
 void
-tracker_db_manager_shutdown (void) 
+tracker_db_manager_shutdown (gboolean remove_tmp) 
 {
         guint i;
 
@@ -2398,8 +2398,10 @@
 	prepared_queries = NULL;
 
 	/* Remove directory in tmp */
-	g_message ("Removing directory:'%s'", sys_tmp_dir);
-	tracker_path_remove (sys_tmp_dir);
+	if (remove_tmp) {
+		g_message ("Removing directory:'%s'", sys_tmp_dir);
+		tracker_path_remove (sys_tmp_dir);
+	}
 
 	g_free (data_dir);
 	g_free (user_data_dir);

Modified: branches/indexer-split/src/libtracker-db/tracker-db-manager.h
==============================================================================
--- branches/indexer-split/src/libtracker-db/tracker-db-manager.h	(original)
+++ branches/indexer-split/src/libtracker-db/tracker-db-manager.h	Tue Jun 24 08:35:49 2008
@@ -49,7 +49,7 @@
 
 void         tracker_db_manager_init                        (TrackerDBManagerFlags  flags,
 							     gboolean              *first_time);
-void         tracker_db_manager_shutdown                    (void);
+void         tracker_db_manager_shutdown                    (gboolean remove_tmp);
 
 void         tracker_db_manager_close_all                   (void);
 

Modified: branches/indexer-split/src/tracker-indexer/tracker-main.c
==============================================================================
--- branches/indexer-split/src/tracker-indexer/tracker-main.c	(original)
+++ branches/indexer-split/src/tracker-indexer/tracker-main.c	Tue Jun 24 08:35:49 2008
@@ -160,7 +160,7 @@
 {
 	g_message ("Shutting down...\n");
 
-	tracker_db_manager_shutdown ();
+	tracker_db_manager_shutdown (FALSE);
 }
 
 gint

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 Jun 24 08:35:49 2008
@@ -890,7 +890,7 @@
 	tracker_email_end_email_watching ();
 	tracker_dbus_shutdown ();
 	tracker_xesam_manager_shutdown ();
-	tracker_db_manager_shutdown ();
+	tracker_db_manager_shutdown (TRUE);
 	tracker_db_shutdown ();
 	tracker_monitor_shutdown ();
 	tracker_nfs_lock_shutdown ();



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