diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-02-08 08:37:46 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-02-08 08:37:46 -0500 |
commit | 7f59b9fb1fdc4519e663fa82e416eccae88e8934 (patch) | |
tree | b7835f898ac1cd47a0e02bea5da20c6eee017733 /src/app/config/config.c | |
parent | b1ae2fd65ba165722dc121df7bb0be4ec5d6597c (diff) | |
parent | ab6534781996404ca57e9f5b0cbdda998579c329 (diff) | |
download | tor-7f59b9fb1fdc4519e663fa82e416eccae88e8934.tar.gz tor-7f59b9fb1fdc4519e663fa82e416eccae88e8934.zip |
Merge branch 'maint-0.3.5'
Diffstat (limited to 'src/app/config/config.c')
-rw-r--r-- | src/app/config/config.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c index 952b9cd301..8e4794315f 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; |