[tracker/rss-enclosures] tracker-store: Also call the set_active callback when no task was active
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] tracker-store: Also call the set_active callback when no task was active
- Date: Wed, 24 Nov 2010 02:22:47 +0000 (UTC)
commit 627e2af0a5b11d77051acf286b077fbb3d637f68
Author: Philip Van Hoof <philip codeminded be>
Date: Wed Nov 3 17:46:32 2010 +0200
tracker-store: Also call the set_active callback when no task was active
src/tracker-store/tracker-store.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-store/tracker-store.c b/src/tracker-store/tracker-store.c
index 68e2a4a..ff7ef5b 100644
--- a/src/tracker-store/tracker-store.c
+++ b/src/tracker-store/tracker-store.c
@@ -155,6 +155,7 @@ sched (TrackerStorePrivate *private)
GQueue *queue;
TrackerStoreTask *task;
gint i;
+ gboolean ran_one = FALSE;
if (!private->active) {
return;
@@ -182,6 +183,7 @@ sched (TrackerStorePrivate *private)
private->n_queries_running++;
+ ran_one = TRUE;
g_thread_pool_push (private->query_pool, task, NULL);
}
@@ -196,9 +198,15 @@ sched (TrackerStorePrivate *private)
if (task != NULL) {
private->update_running = TRUE;
+ ran_one = TRUE;
g_thread_pool_push (private->update_pool, task, NULL);
}
}
+
+ if (!ran_one && private->active_callback) {
+ private->active_callback (private->active_user_data);
+ private->active_callback = NULL;
+ }
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]