[tracker/journal-compression-review: 12/12] 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-review: 12/12] Disable journal rotating when GLib not recent enough
- Date: Wed, 23 Jun 2010 10:47:31 +0000 (UTC)
commit fa9705303f8d411b3f355df1fb5a8a25e58f23ee
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 6ca37a4..2115ec3 100644
--- a/src/tracker-store/tracker-main.c
+++ b/src/tracker-store/tracker-main.c
@@ -339,6 +339,7 @@ main (gint argc, gchar *argv[])
gsize chunk_size;
const gchar *rotate_to;
TrackerDBConfig *db_config;
+ gboolean do_rotating;
g_type_init ();
@@ -452,7 +453,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]