[tracker] libtracker-miner: Run the async result on high priority sparql buffer updates



commit 69549408741d349a5f6416857fd2dbf66dd9f3c2
Author: Carlos Garnacho <carlos lanedo com>
Date:   Thu Jul 21 17:25:29 2011 +0200

    libtracker-miner: Run the async result on high priority sparql buffer updates

 src/libtracker-miner/tracker-sparql-buffer.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-sparql-buffer.c b/src/libtracker-miner/tracker-sparql-buffer.c
index cb35b44..663e79c 100644
--- a/src/libtracker-miner/tracker-sparql-buffer.c
+++ b/src/libtracker-miner/tracker-sparql-buffer.c
@@ -556,15 +556,25 @@ tracker_sparql_buffer_update_cb (GObject      *object,
                                  gpointer      user_data)
 {
 	UpdateData *update_data = user_data;
+	SparqlTaskData *task_data;
 	GError *error = NULL;
 
 	tracker_sparql_connection_update_finish (TRACKER_SPARQL_CONNECTION (object),
 	                                         result, &error);
+
+	task_data = tracker_task_get_data (update_data->task);
+
+	/* Call finished handler with the error, if any */
+	g_simple_async_result_set_op_res_gpointer (task_data->result,
+						   update_data->task,
+						   NULL);
 	if (error) {
-		g_critical ("Error in prioritized update: %s\n", error->message);
+		g_simple_async_result_set_from_error (task_data->result, error);
 		g_error_free (error);
 	}
 
+	g_simple_async_result_complete (task_data->result);
+
 	tracker_task_pool_remove (TRACKER_TASK_POOL (update_data->buffer),
 	                          update_data->task);
 	g_slice_free (UpdateData, update_data);



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