aboutsummaryrefslogtreecommitdiff
path: root/src/feature/dirauth/dirauth_config.c
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-10-29 00:33:31 +1000
committerteor <teor@torproject.org>2019-10-31 12:34:19 +1000
commit3881ac2c8655c56f9451ad33c6ea297559ad9279 (patch)
treed627957bd0d6b1880de8f8335154aeb46db342e6 /src/feature/dirauth/dirauth_config.c
parentda49c4d78dee04aa493ebce2a60169034a48b464 (diff)
downloadtor-3881ac2c8655c56f9451ad33c6ea297559ad9279.tar.gz
tor-3881ac2c8655c56f9451ad33c6ea297559ad9279.zip
dirauth: Refactor some config checks
Minor cleanup and simplification. Part of 32213.
Diffstat (limited to 'src/feature/dirauth/dirauth_config.c')
-rw-r--r--src/feature/dirauth/dirauth_config.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/feature/dirauth/dirauth_config.c b/src/feature/dirauth/dirauth_config.c
index 3334213ab4..13700a31b0 100644
--- a/src/feature/dirauth/dirauth_config.c
+++ b/src/feature/dirauth/dirauth_config.c
@@ -106,16 +106,16 @@ options_validate_dirauth_mode(const or_options_t *old_options,
if (options->GuardfractionFile && !old_options) {
dirserv_read_guardfraction_file(options->GuardfractionFile, NULL);
}
- }
- if (options->AuthoritativeDir && !options->DirPort_set)
- REJECT("Running as authoritative directory, but no DirPort set.");
+ if (!options->DirPort_set)
+ REJECT("Running as authoritative directory, but no DirPort set.");
- if (options->AuthoritativeDir && !options->ORPort_set)
- REJECT("Running as authoritative directory, but no ORPort set.");
+ if (!options->ORPort_set)
+ REJECT("Running as authoritative directory, but no ORPort set.");
- if (options->AuthoritativeDir && options->ClientOnly)
- REJECT("Running as authoritative directory, but ClientOnly also set.");
+ if (options->ClientOnly)
+ REJECT("Running as authoritative directory, but ClientOnly also set.");
+ }
return 0;
}