[tracker/fts] libtracker-data: Don't set async wrapper callback func to NULL after calling it
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/fts] libtracker-data: Don't set async wrapper callback func to NULL after calling it
- Date: Tue, 14 Sep 2010 16:19:37 +0000 (UTC)
commit e7060c57a5474940bc2077ac8b1dcb9b4874fe47
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]