mirror of
https://github.com/NLnetLabs/unbound.git
synced 2024-09-21 14:47:09 +00:00
parent
fe0b1da859
commit
e860d39f54
@ -1,3 +1,6 @@
|
||||
1 August 2019: Wouter
|
||||
- For #52 #53, second context does not close logfile override.
|
||||
|
||||
29 July 2019: Wouter
|
||||
- Add verbose log message when auth zone file is written, at level 4.
|
||||
- Add hex print of trust anchor pointer to trust anchor file temp
|
||||
|
@ -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) {
|
||||
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;
|
||||
|
@ -52,6 +52,9 @@ struct tube;
|
||||
struct sldns_buffer;
|
||||
struct ub_event_base;
|
||||
|
||||
/** store that the logfile has a debug override */
|
||||
extern int ctx_logfile_overridden;
|
||||
|
||||
/**
|
||||
* The context structure
|
||||
*
|
||||
|
@ -79,6 +79,9 @@
|
||||
#include <iphlpapi.h>
|
||||
#endif /* UB_ON_WINDOWS */
|
||||
|
||||
/** store that the logfile has a debug override */
|
||||
int ctx_logfile_overridden = 0;
|
||||
|
||||
/** create context functionality, but no pipes */
|
||||
static struct ub_ctx* ub_ctx_create_nopipe(void)
|
||||
{
|
||||
@ -328,8 +331,10 @@ ub_ctx_delete(struct ub_ctx* ctx)
|
||||
ub_randfree(ctx->seed_rnd);
|
||||
alloc_clear(&ctx->superalloc);
|
||||
traverse_postorder(&ctx->queries, delq, NULL);
|
||||
if(ctx->logfile_override)
|
||||
if(ctx_logfile_overridden) {
|
||||
log_file(NULL);
|
||||
ctx_logfile_overridden = 0;
|
||||
}
|
||||
free(ctx);
|
||||
#ifdef USE_WINSOCK
|
||||
WSACleanup();
|
||||
|
Loading…
Reference in New Issue
Block a user