[tracker/async-queries-due] tracker-store: Fix crash when client disappears with queries



commit ea569b6304afd89b429f7cacc9ad0a8519753d1b
Author: Jürg Billeter <j bitron ch>
Date:   Thu Apr 15 17:35:49 2010 +0200

    tracker-store: Fix crash when client disappears with queries

 src/tracker-store/tracker-store.c |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/src/tracker-store/tracker-store.c b/src/tracker-store/tracker-store.c
index 63f7364..5455cf6 100644
--- a/src/tracker-store/tracker-store.c
+++ b/src/tracker-store/tracker-store.c
@@ -624,13 +624,18 @@ tracker_store_unreg_batches (const gchar *client_id)
 
 			if (task && task->type != TRACKER_STORE_TASK_TYPE_TURTLE) {
 				if (g_strcmp0 (task->data.update.client_id, client_id) == 0) {
-					if (task->type == TRACKER_STORE_TASK_TYPE_UPDATE) {
-						if (!error) {
-							g_set_error (&error, TRACKER_DBUS_ERROR, 0,
-								     "Client disappeared");
-						}
+					if (!error) {
+						g_set_error (&error, TRACKER_DBUS_ERROR, 0,
+							     "Client disappeared");
+					}
+
+					if (task->type == TRACKER_STORE_TASK_TYPE_QUERY) {
+						task->callback.query_callback (NULL, error, task->user_data);
+					} else if (task->type == TRACKER_STORE_TASK_TYPE_UPDATE) {
 						task->callback.update_callback (error, task->user_data);
-					} else {
+					} else if (task->type == TRACKER_STORE_TASK_TYPE_UPDATE_BLANK) {
+						task->callback.update_blank_callback (NULL, error, task->user_data);
+					} else if (task->type == TRACKER_STORE_TASK_TYPE_COMMIT) {
 						task->callback.commit_callback (task->user_data);
 					}
 					task->destroy (task->user_data);



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