[tracker/tracker-0.10] libtracker-miner: Remove tasks for not found files from the pool



commit ed6635408dadaee8d83b99f43bfaaee82c015156
Author: Carlos Garnacho <carlos lanedo com>
Date:   Fri Nov 25 16:04:51 2011 +0100

    libtracker-miner: Remove tasks for not found files from the pool
    
    Else, they're left stuck there forever, eventually filling in the
    task pool if ::process-file is called to many times on a just
    removed file (eg. temporary ones)

 src/libtracker-miner/tracker-miner-fs.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 974ba6d..3fd7538 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -1927,6 +1927,10 @@ item_add_or_update_cb (TrackerMinerFS *fs,
 				g_free (uri);
 				return;
 			} else if (error->code == G_IO_ERROR_NOT_FOUND) {
+				tracker_task_pool_remove (fs->priv->task_pool, extraction_task);
+				fs->priv->extraction_tasks = g_list_remove (fs->priv->extraction_tasks,
+									    extraction_task);
+
 				/* File was not found, remove it
 				 * if it was in the store
 				 */



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