tracker r1378 - in trunk: . src/trackerd
- From: laguerre svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1378 - in trunk: . src/trackerd
- Date: Thu, 8 May 2008 16:45:12 +0100 (BST)
Author: laguerre
Date: Thu May 8 15:45:12 2008
New Revision: 1378
URL: http://svn.gnome.org/viewvc/tracker?rev=1378&view=rev
Log:
Fixes random crashes with tracker_process_files_set_temp_black_list
Modified:
trunk/ChangeLog
trunk/src/trackerd/tracker-db.c
trunk/src/trackerd/tracker-process-files.c
trunk/src/trackerd/tracker-process-files.h
trunk/src/trackerd/trackerd.c
Modified: trunk/src/trackerd/tracker-db.c
==============================================================================
--- trunk/src/trackerd/tracker-db.c (original)
+++ trunk/src/trackerd/tracker-db.c Thu May 8 15:45:12 2008
@@ -605,7 +605,6 @@
g_slist_foreach (black_list,
(GFunc) index_blacklist_file,
NULL);
- g_slist_free (black_list);
tracker_process_files_set_temp_black_list (NULL);
Modified: trunk/src/trackerd/tracker-process-files.c
==============================================================================
--- trunk/src/trackerd/tracker-process-files.c (original)
+++ trunk/src/trackerd/tracker-process-files.c Thu May 8 15:45:12 2008
@@ -1824,12 +1824,20 @@
void
tracker_process_files_set_temp_black_list (GSList *black_list)
{
+ tracker_process_files_free_temp_black_list ();
+ temp_black_list = black_list;
+}
+
+void
+tracker_process_files_free_temp_black_list (void)
+{
g_slist_foreach (temp_black_list,
(GFunc) g_free,
NULL);
+
g_slist_free (temp_black_list);
-
- temp_black_list = black_list;
+
+ temp_black_list = NULL;
}
void
Modified: trunk/src/trackerd/tracker-process-files.h
==============================================================================
--- trunk/src/trackerd/tracker-process-files.h (original)
+++ trunk/src/trackerd/tracker-process-files.h Thu May 8 15:45:12 2008
@@ -36,6 +36,7 @@
/* Black list API */
GSList *tracker_process_files_get_temp_black_list (void);
void tracker_process_files_set_temp_black_list (GSList *black_list);
+void tracker_process_files_free_temp_black_list (void);
void tracker_process_files_append_temp_black_list (const gchar *str);
/* File/Directory API */
Modified: trunk/src/trackerd/trackerd.c
==============================================================================
--- trunk/src/trackerd/trackerd.c (original)
+++ trunk/src/trackerd/trackerd.c Thu May 8 15:45:12 2008
@@ -200,9 +200,7 @@
g_free (parent);
g_free (parent_name);
- g_free (parent_path);
-
-
+ g_free (parent_path);
}
gboolean
@@ -294,7 +292,7 @@
g_slist_foreach (black_list,
(GFunc) reset_blacklist_file,
NULL);
- g_slist_free (black_list);
+ tracker_process_files_free_temp_black_list ();
tracker_db_close (main_thread_db_con);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]