[tracker/tracker-0.12: 67/202] libtracker-miner: avoid logging global error in update array multiple times



commit a39da0c6117e54c02b65b3f3c4f2c7367e4aaae1
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Wed Sep 21 11:17:11 2011 +0200

    libtracker-miner: avoid logging global error in update array multiple times

 src/libtracker-miner/tracker-sparql-buffer.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-sparql-buffer.c b/src/libtracker-miner/tracker-sparql-buffer.c
index 45d76ad..35f06c2 100644
--- a/src/libtracker-miner/tracker-sparql-buffer.c
+++ b/src/libtracker-miner/tracker-sparql-buffer.c
@@ -301,14 +301,16 @@ tracker_sparql_buffer_update_array_cb (GObject      *object,
 			 */
 			error_pos += update_data->n_bulk_operations;
 			error = g_ptr_array_index (sparql_array_errors, error_pos);
+			if (error) {
+				g_critical ("  (Sparql buffer) Error in task %u of the array-update: %s",
+				            i, error->message);
+			}
 		}
 
 		/* Call finished handler with the error, if any */
 		g_simple_async_result_set_op_res_gpointer (task_data->result,
 		                                           task, NULL);
 		if (error) {
-			g_critical ("  (Sparql buffer) Error in task %u of the array-update: %s",
-			            i, error->message);
 			g_simple_async_result_set_from_error (task_data->result, error);
 		}
 



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