tracker r1852 - in branches/indexer-split: . src/libtracker-common src/trackerd



Author: mr
Date: Fri Jul  4 08:25:19 2008
New Revision: 1852
URL: http://svn.gnome.org/viewvc/tracker?rev=1852&view=rev

Log:
	* src/libtracker-common/tracker-log.c: If we can't open the log,
	add a "\n" to the error so we don't get 2 messages on the same
	line. 

	* src/trackerd/tracker-crawler.c: Make sure we set module_name to
	NULL when getting the next queue with data and recheck the next
	queue in the running callback in case things have changed.


Modified:
   branches/indexer-split/ChangeLog
   branches/indexer-split/src/libtracker-common/tracker-log.c
   branches/indexer-split/src/trackerd/tracker-crawler.c

Modified: branches/indexer-split/src/libtracker-common/tracker-log.c
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-log.c	(original)
+++ branches/indexer-split/src/libtracker-common/tracker-log.c	Fri Jul  4 08:25:19 2008
@@ -66,7 +66,7 @@
 
 	fd = g_fopen (log->filename, "a");
 	if (!fd) {
-		g_fprintf (stderr, "Could not open log: '%s'", log->filename);
+		g_fprintf (stderr, "Could not open log: '%s'\n", log->filename);
 		g_mutex_unlock (log->mutex);
 		return;
 	}

Modified: branches/indexer-split/src/trackerd/tracker-crawler.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-crawler.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-crawler.c	Fri Jul  4 08:25:19 2008
@@ -400,6 +400,10 @@
 	GQueue *q;
 	gchar  *module_name;
 
+	if (module_name_p) {
+		*module_name_p = NULL;
+	}
+
 	for (l = crawler->private->file_queues_order; l; l = l->next) {
 		module_name = l->data;
 		q = g_hash_table_lookup (crawler->private->file_queues, module_name);
@@ -723,8 +727,15 @@
 	}
 
 	queue = queue_get_next_for_files_with_data (crawler, &module_name);
-	total = g_queue_get_length (queue);
 
+	if (!queue || !module_name) {
+		g_message ("No file queues to process");
+		g_object_unref (crawler);
+
+		return;
+	}
+
+	total = g_queue_get_length (queue);
 	files = tracker_dbus_queue_gfile_to_strv (queue, FILES_QUEUE_PROCESS_MAX);
 	
 	g_message ("File check queue processed, sending first %d/%d, for module:'%s' to the indexer",



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