tracker r1408 - in branches/indexer-split: . src/trackerd
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1408 - in branches/indexer-split: . src/trackerd
- Date: Tue, 13 May 2008 14:29:17 +0100 (BST)
Author: mr
Date: Tue May 13 13:29:17 2008
New Revision: 1408
URL: http://svn.gnome.org/viewvc/tracker?rev=1408&view=rev
Log:
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/src/trackerd/tracker-main.c
branches/indexer-split/src/trackerd/tracker-main.h
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 May 13 13:29:17 2008
@@ -127,8 +127,11 @@
DBConnection *main_thread_db_con;
DBConnection *main_thread_cache_con;
+/* Private */
static GMainLoop *main_loop;
+static gchar *log_filename;
+/* Private command line parameters */
static gchar **no_watch_dirs;
static gchar **watch_dirs;
static gchar **crawl_dirs;
@@ -456,6 +459,7 @@
{
gchar *str;
+ /* Public locations */
str = g_strdup_printf ("Tracker-%s.%d", g_get_user_name (), getpid ());
tracker->sys_tmp_root_dir = g_build_filename (g_get_tmp_dir (), str, NULL);
g_free (str);
@@ -467,7 +471,9 @@
tracker->xesam_dir = g_build_filename (g_get_home_dir (), ".xesam", NULL);
tracker->email_attachments_dir = g_build_filename (tracker->sys_tmp_root_dir, "Attachments", NULL);
- tracker->log_filename = g_build_filename (tracker->root_dir, "tracker.log", NULL);
+
+ /* Private locations */
+ log_filename = g_build_filename (tracker->root_dir, "tracker.log", NULL);
}
static void
@@ -509,7 +515,7 @@
g_mkdir_with_parents (tracker->email_attachments_dir, 00700);
/* Remove existing log files */
- tracker_file_unlink (tracker->log_filename);
+ tracker_file_unlink (log_filename);
}
static void
@@ -785,6 +791,22 @@
}
static void
+shutdown_locations (void)
+{
+ /* Public locations */
+ g_free (tracker->data_dir);
+ g_free (tracker->config_dir);
+ g_free (tracker->root_dir);
+ g_free (tracker->user_data_dir);
+ g_free (tracker->sys_tmp_root_dir);
+ g_free (tracker->email_attachments_dir);
+ g_free (tracker->xesam_dir);
+
+ /* Private locations */
+ g_free (log_filename);
+}
+
+static void
shutdown_directories (void)
{
/* If we are reindexing, just remove the databases */
@@ -797,15 +819,6 @@
if (tracker->sys_tmp_root_dir) {
tracker_dir_remove (tracker->sys_tmp_root_dir);
}
-
- g_free (tracker->data_dir);
- g_free (tracker->config_dir);
- g_free (tracker->root_dir);
- g_free (tracker->user_data_dir);
- g_free (tracker->sys_tmp_root_dir);
- g_free (tracker->email_attachments_dir);
- g_free (tracker->xesam_dir);
- g_free (tracker->log_filename);
}
gint
@@ -893,7 +906,7 @@
tracker->config = tracker_config_new ();
tracker->language = tracker_language_new (tracker->config);
- tracker_log_init (tracker->log_filename,
+ tracker_log_init (log_filename,
tracker_config_get_verbosity (tracker->config),
fatal_errors);
tracker_nfs_lock_init (tracker->root_dir,
@@ -1051,6 +1064,7 @@
shutdown_indexer ();
shutdown_databases ();
shutdown_directories ();
+ shutdown_locations ();
/* Clean up other struct members */
if (tracker->file_process_queue) {
Modified: branches/indexer-split/src/trackerd/tracker-main.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-main.h (original)
+++ branches/indexer-split/src/trackerd/tracker-main.h Tue May 13 13:29:17 2008
@@ -69,8 +69,6 @@
gchar *email_attachments_dir;
gchar *xesam_dir;
- gchar *log_filename;
-
/* Performance and memory usage options */
gint max_process_queue_size;
gint max_extract_queue_size;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]