From e2fe726866d062155f6b1aae749375475ef19191 Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Sat, 28 Dec 2019 05:27:06 +0000 Subject: Vendor import of Unbound 1.9.6. --- libunbound/context.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'libunbound/context.c') diff --git a/libunbound/context.c b/libunbound/context.c index 20e3680ec3bc..b8fe87d2e580 100644 --- a/libunbound/context.c +++ b/libunbound/context.c @@ -57,9 +57,16 @@ context_finalize(struct ub_ctx* ctx) { struct config_file* cfg = ctx->env->cfg; verbosity = cfg->verbosity; - if(ctx->logfile_override) + if(ctx_logfile_overridden && !ctx->logfile_override) { + log_file(NULL); /* clear that override */ + ctx_logfile_overridden = 0; + } + if(ctx->logfile_override) { + ctx_logfile_overridden = 1; log_file(ctx->log_out); - else log_init(cfg->logfile, cfg->use_syslog, NULL); + } else { + log_init(cfg->logfile, cfg->use_syslog, NULL); + } config_apply(cfg); if(!modstack_setup(&ctx->mods, cfg->module_conf, ctx->env)) return UB_INITFAIL; -- cgit v1.3