[tracker/tracker-store-queue] Unset batch_mode when the TTL file is processed
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker/tracker-store-queue] Unset batch_mode when the TTL file is processed
- Date: Thu, 21 May 2009 08:56:19 -0400 (EDT)
commit 4aa84d992982595db01607858c2bb059405cf0d7
Author: Philip Van Hoof <philip codeminded be>
Date: Thu May 21 14:55:49 2009 +0200
Unset batch_mode when the TTL file is processed
---
src/tracker-store/tracker-resources.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/src/tracker-store/tracker-resources.c b/src/tracker-store/tracker-resources.c
index b5361f0..8370938 100644
--- a/src/tracker-store/tracker-resources.c
+++ b/src/tracker-store/tracker-resources.c
@@ -254,6 +254,19 @@ tracker_resources_delete (TrackerResources *self,
static void
+s_turtle_commit_callback (gpointer user_data)
+{
+ TrackerResources *object = user_data;
+ TrackerResourcesPrivate *priv;
+
+ priv = TRACKER_RESOURCES_GET_PRIVATE (object);
+
+ priv->batch_count = 0;
+
+ g_object_unref (object);
+}
+
+static void
turtle_commit_callback (gpointer user_data)
{
TrackerResources *object = user_data;
@@ -262,6 +275,7 @@ turtle_commit_callback (gpointer user_data)
priv = TRACKER_RESOURCES_GET_PRIVATE (object);
priv->batch_count = 0;
+ priv->batch_mode = FALSE;
g_object_unref (object);
}
@@ -275,7 +289,7 @@ turtle_update_callback (GError *error, gpointer user_data)
priv = TRACKER_RESOURCES_GET_PRIVATE (object);
if (++priv->batch_count >= TRACKER_STORE_TRANSACTION_MAX) {
- tracker_store_queue_batch_commit (turtle_commit_callback,
+ tracker_store_queue_batch_commit (s_turtle_commit_callback,
g_object_ref (object),
NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]