summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-10-24 08:25:29 -0400
committerNick Mathewson <nickm@torproject.org>2017-10-24 08:25:29 -0400
commitabbd6a36fc65378248548a1276f31dd1bb1a6906 (patch)
treed22e8e20ca41d7132fe8ac65d00cde6efad7c455 /src/or/config.c
parentf7707c9031381cf3ceb663d3bc3a9c81e346a90d (diff)
parent0d4addfc73c2647357aaaede54dbf936ff189b2e (diff)
downloadtor-abbd6a36fc65378248548a1276f31dd1bb1a6906.tar.gz
tor-abbd6a36fc65378248548a1276f31dd1bb1a6906.zip
Merge branch 'maint-0.3.2'
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 6270b795f8..705113c80a 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1030,6 +1030,23 @@ escaped_safe_str(const char *address)
return escaped(address);
}
+/**
+ * The severity level that should be used for warnings of severity
+ * LOG_PROTOCOL_WARN.
+ *
+ * We keep this outside the options, in case somebody needs to use
+ * LOG_PROTOCOL_WARN while an option transition is happening.
+ */
+static int protocol_warning_severity_level = LOG_WARN;
+
+/** Return the severity level that should be used for warnings of severity
+ * LOG_PROTOCOL_WARN. */
+int
+get_protocol_warning_severity_level(void)
+{
+ return protocol_warning_severity_level;
+}
+
/** List of default directory authorities */
static const char *default_authorities[] = {
@@ -1667,6 +1684,11 @@ options_act(const or_options_t *old_options)
return -1;
}
+ if (options->ProtocolWarnings)
+ protocol_warning_severity_level = LOG_WARN;
+ else
+ protocol_warning_severity_level = LOG_INFO;
+
if (consider_adding_dir_servers(options, old_options) < 0)
return -1;