tracker r2874 - in trunk: . src/trackerd
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2874 - in trunk: . src/trackerd
- Date: Tue, 3 Feb 2009 16:57:07 +0000 (UTC)
Author: mr
Date: Tue Feb 3 16:57:07 2009
New Revision: 2874
URL: http://svn.gnome.org/viewvc/tracker?rev=2874&view=rev
Log:
* src/trackerd/tracker-processor.c: (process_module_next),
(crawler_finished_cb): Make sure we stop processing modules if the
removable devices is less than the number of removable devices we
have completed - i.e. there is some miscalculation somewhere.
Also, make sure we don't add removable devices into the completed
list AGAIN if we get the "finished" signal from the crawler
(because we added a new directory). This was causing some serious
lock ups.
Modified:
trunk/ChangeLog
trunk/src/trackerd/tracker-processor.c
Modified: trunk/src/trackerd/tracker-processor.c
==============================================================================
--- trunk/src/trackerd/tracker-processor.c (original)
+++ trunk/src/trackerd/tracker-processor.c Tue Feb 3 16:57:07 2009
@@ -1056,7 +1056,7 @@
*/
if (process_module_is_disabled (processor, module_name) ||
- (g_list_length (processor->private->removable_devices) ==
+ (g_list_length (processor->private->removable_devices) <=
g_list_length (processor->private->removable_devices_completed))) {
processor->private->interrupted = FALSE;
tracker_processor_stop (processor);
@@ -1491,10 +1491,21 @@
const gchar *root;
root = processor->private->removable_devices_current->data;
-
- processor->private->removable_devices_completed =
- g_list_append (processor->private->removable_devices_completed,
- g_strdup (root));
+
+ /* Don't add to the list if *already* on it. How can
+ * this happen I hear you ask? :) Well, the crawler
+ * will emit finished if a new directory is added and
+ * it isn't monitored and has to be crawled. This can
+ * happen on a removable device that we have already
+ * scanned.
+ */
+ if (!g_list_find_custom (processor->private->removable_devices_completed,
+ root,
+ (GCompareFunc) strcmp)) {
+ processor->private->removable_devices_completed =
+ g_list_append (processor->private->removable_devices_completed,
+ g_strdup (root));
+ }
}
/* Proceed to next module */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]