[tracker/rss-enclosures] libtracker-data: Don't set async wrapper callback func to NULL after calling it



commit 72749d5e96cb16e618cb75a379d7ea7ddfc63fcc
Author: Martyn Russell <martyn lanedo com>
Date:   Tue Sep 14 17:19:24 2010 +0100

    libtracker-data: Don't set async wrapper callback func to NULL after calling it
    
    If the callback that's called actually calls the cursor_next_async()
    then the callback is set to NULL after it is initially set and so no
    results are reported for n>1 items.

 src/libtracker-data/tracker-db-interface-sqlite.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c b/src/libtracker-data/tracker-db-interface-sqlite.c
index 05b8d46..b601e0b 100644
--- a/src/libtracker-data/tracker-db-interface-sqlite.c
+++ b/src/libtracker-data/tracker-db-interface-sqlite.c
@@ -1129,8 +1129,10 @@ async_ready_callback_wrapper (GObject      *source_object,
 
 	iface->pending = FALSE;
 	if (iface->outstanding_callback) {
-		iface->outstanding_callback (source_object, res, user_data);
+		GAsyncReadyCallback callback = iface->outstanding_callback;
+
 		iface->outstanding_callback = NULL;
+		(callback) (source_object, res, user_data);
 	}
 	g_object_unref (cursor);
 }



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