summaryrefslogtreecommitdiff
path: root/ctdb/common
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2017-05-06 02:08:50 +1000
committerVolker Lendecke <vl@samba.org>2017-05-08 00:12:25 +0200
commitaf09a733e953072707cde7df0126652e646970f6 (patch)
treedd90299a49c9682de93e8dc6788807478429870b /ctdb/common
parent220c617cc03c90bee78711a7ca692932a675203d (diff)
downloadsamba-af09a733e953072707cde7df0126652e646970f6.tar.gz
ctdb-logging: Initialize DEBUGLEVEL before changing the value
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12770 DEBUGLEVEL is defined as a const array reference at compile time. debug_init() converts that to an allocated array reference at run time. Since debug_init() is a static function, initialize DEBUGLEVEL via setup_logging(). Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon May 8 00:12:25 CEST 2017 on sn-devel-144
Diffstat (limited to 'ctdb/common')
-rw-r--r--ctdb/common/logging.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ctdb/common/logging.c b/ctdb/common/logging.c
index 8e547c97d9d..e1b8e7f2ecd 100644
--- a/ctdb/common/logging.c
+++ b/ctdb/common/logging.c
@@ -501,6 +501,8 @@ int logging_init(TALLOC_CTX *mem_ctx, const char *logging,
char *str, *name, *option;
int ret, i;
+ setup_logging(app_name, DEBUG_STDERR);
+
if (debug_level == NULL) {
debug_level = getenv("CTDB_DEBUGLEVEL");
}