Skip to content
Snippets Groups Projects
Commit 3881ac2c authored by teor's avatar teor
Browse files

dirauth: Refactor some config checks

Minor cleanup and simplification.

Part of 32213.
parent da49c4d7
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment