aboutsummaryrefslogtreecommitdiff
path: root/src/app/config/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/config/config.c')
-rw-r--r--src/app/config/config.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 6b9162a3df..803a0eda54 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -1056,10 +1056,14 @@ config_free_all(void)
* (We return "[scrubbed]" if SafeLogging is "1", and address otherwise.)
*/
const char *
-safe_str_client(const char *address)
+safe_str_client_opts(const or_options_t *options, const char *address)
{
tor_assert(address);
- if (get_options()->SafeLogging_ == SAFELOG_SCRUB_ALL)
+ if (!options) {
+ options = get_options();
+ }
+
+ if (options->SafeLogging_ == SAFELOG_SCRUB_ALL)
return "[scrubbed]";
else
return address;
@@ -1073,10 +1077,14 @@ safe_str_client(const char *address)
* otherwise.)
*/
const char *
-safe_str(const char *address)
+safe_str_opts(const or_options_t *options, const char *address)
{
tor_assert(address);
- if (get_options()->SafeLogging_ != SAFELOG_SCRUB_NONE)
+ if (!options) {
+ options = get_options();
+ }
+
+ if (options->SafeLogging_ != SAFELOG_SCRUB_NONE)
return "[scrubbed]";
else
return address;
@@ -3546,7 +3554,8 @@ options_validate(or_options_t *old_options, or_options_t *options,
"(Bridge/V3)AuthoritativeDir is set.");
/* If we have a v3bandwidthsfile and it's broken, complain on startup */
if (options->V3BandwidthsFile && !old_options) {
- dirserv_read_measured_bandwidths(options->V3BandwidthsFile, NULL, NULL);
+ dirserv_read_measured_bandwidths(options->V3BandwidthsFile, NULL, NULL,
+ NULL);
}
/* same for guardfraction file */
if (options->GuardfractionFile && !old_options) {