[tracker] libtracker-common: Fix tracker_log_shutdown
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-common: Fix tracker_log_shutdown
- Date: Wed, 11 Aug 2010 15:55:54 +0000 (UTC)
commit b4508c4d8309427ea055a9f1000ab6083e251062
Author: Jürg Billeter <j bitron ch>
Date: Wed Aug 11 17:53:40 2010 +0200
libtracker-common: Fix tracker_log_shutdown
src/libtracker-common/tracker-log.c | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/src/libtracker-common/tracker-log.c b/src/libtracker-common/tracker-log.c
index ed96727..ad71d1b 100644
--- a/src/libtracker-common/tracker-log.c
+++ b/src/libtracker-common/tracker-log.c
@@ -207,11 +207,13 @@ tracker_log_init (gint this_verbosity,
break;
}
- /* Hide log levels according to configuration */
- log_handler_id = g_log_set_handler (G_LOG_DOMAIN,
- hide_levels,
- hide_log_handler,
- NULL);
+ if (hide_levels) {
+ /* Hide log levels according to configuration */
+ log_handler_id = g_log_set_handler (G_LOG_DOMAIN,
+ hide_levels,
+ hide_log_handler,
+ NULL);
+ }
/* Set log handler function for the rest */
g_log_set_default_handler (tracker_log_handler, NULL);
@@ -241,8 +243,10 @@ tracker_log_shutdown (void)
fclose (fd);
}
- g_log_remove_handler (NULL, log_handler_id);
- log_handler_id = 0;
+ if (log_handler_id) {
+ g_log_remove_handler (G_LOG_DOMAIN, log_handler_id);
+ log_handler_id = 0;
+ }
g_mutex_free (mutex);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]