summaryrefslogtreecommitdiff
path: root/src/app/config/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-02-08 08:37:43 -0500
committerNick Mathewson <nickm@torproject.org>2019-02-08 08:37:43 -0500
commitab6534781996404ca57e9f5b0cbdda998579c329 (patch)
treebab5257169246e99f755f1c93585139687fa5549 /src/app/config/config.c
parent4b36f9676db4ca98101c26ba5fc539ed458ae571 (diff)
parenteca0f87801ea5062038544b6cfe2bdbba0998999 (diff)
downloadtor-ab6534781996404ca57e9f5b0cbdda998579c329.tar.gz
tor-ab6534781996404ca57e9f5b0cbdda998579c329.zip
Merge branch 'ticket29040_1_changes' into maint-0.3.5
Diffstat (limited to 'src/app/config/config.c')
-rw-r--r--src/app/config/config.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 974b97130f..e06c77e439 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -1086,10 +1086,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;
@@ -1103,10 +1107,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;