[tracker/journal-compression-review2: 13/16] Disable journal rotating when GLib not recent enough
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/journal-compression-review2: 13/16] Disable journal rotating when GLib not recent enough
- Date: Thu, 15 Jul 2010 10:01:56 +0000 (UTC)
commit 77f6cd2afe5f7857dd2f760433b2e4f4113cf51d
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]