Commit 7c07129a authored by Tony Finch's avatar Tony Finch Committed by Mark Andrews
Browse files

Fix `rndc dnstap -roll N`

The `rndc` argument was always overridden by the static configuration,
because the logic for handling the number of dnstap files to retain
was both backwards and a bit redundant.
parent e8fa9986
...@@ -337,7 +337,7 @@ dns_dt_reopen(dns_dtenv_t *env, int roll) { ...@@ -337,7 +337,7 @@ dns_dt_reopen(dns_dtenv_t *env, int roll) {
fstrm_iothr_destroy(&env->iothr); fstrm_iothr_destroy(&env->iothr);
} }
if (roll != 0) { if (roll == 0) {
roll = env->rolls; roll = env->rolls;
} }
...@@ -349,7 +349,7 @@ dns_dt_reopen(dns_dtenv_t *env, int roll) { ...@@ -349,7 +349,7 @@ dns_dt_reopen(dns_dtenv_t *env, int roll) {
char *filename = isc_mem_strdup(env->mctx, env->path); char *filename = isc_mem_strdup(env->mctx, env->path);
file.name = filename; file.name = filename;
file.stream = NULL; file.stream = NULL;
file.versions = roll != 0 ? roll : env->rolls; file.versions = roll;
file.maximum_size = 0; file.maximum_size = 0;
file.maximum_reached = false; file.maximum_reached = false;
file.suffix = env->suffix; file.suffix = env->suffix;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment