[tracker] Disable journal rotating when GLib not recent enough



commit 99ec6a23c87495d659b21f62401890eed994b7dc
Author: Philip Van Hoof <philip codeminded be>
Date:   Wed Jun 23 12:37:21 2010 +0200

    Disable journal rotating when GLib not recent enough

 src/tracker-store/tracker-main.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-store/tracker-main.c b/src/tracker-store/tracker-main.c
index 6ef3391..8798099 100644
--- a/src/tracker-store/tracker-main.c
+++ b/src/tracker-store/tracker-main.c
@@ -340,6 +340,7 @@ main (gint argc, gchar *argv[])
 	gsize chunk_size;
 	const gchar *rotate_to;
 	TrackerDBConfig *db_config;
+	gboolean do_rotating;
 
 	g_type_init ();
 
@@ -453,7 +454,15 @@ main (gint argc, gchar *argv[])
 	if (rotate_to[0] == '\0')
 		rotate_to = NULL;
 
-	tracker_db_journal_set_rotating ((chunk_size_mb != -1), chunk_size, rotate_to);
+	do_rotating = (chunk_size_mb != -1);
+
+	if (!GLIB_CHECK_VERSION (2, 24, 2)) {
+		if (do_rotating) {
+			g_warning ("Your GLib isn't recent enough for journal rotating to be enabled");
+			do_rotating = FALSE;
+		}
+		tracker_db_journal_set_rotating (do_rotating, chunk_size, rotate_to);
+	}
 
 	if (!tracker_data_manager_init (flags,
 	                                NULL,



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