diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-08-03 12:08:57 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-08-03 12:08:57 -0400 |
commit | 66e610da7239e8921c0063043c07c7f2c3fd48d9 (patch) | |
tree | 6b0b2c5ac09ee4353b2834f9d7ca2da3d8610185 /src/or/confparse.c | |
parent | e6220ccbf8004090b9bcc7228b33d85d2cf9c067 (diff) | |
download | tor-66e610da7239e8921c0063043c07c7f2c3fd48d9.tar.gz tor-66e610da7239e8921c0063043c07c7f2c3fd48d9.zip |
Mark a big pile of options as deprecated.
Diffstat (limited to 'src/or/confparse.c')
-rw-r--r-- | src/or/confparse.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/confparse.c b/src/or/confparse.c index 233cc7c77d..8bd4b81cda 100644 --- a/src/or/confparse.c +++ b/src/or/confparse.c @@ -192,7 +192,7 @@ config_find_deprecation(const config_format_t *fmt, const char *key) if (fmt->deprecations == NULL) return NULL; - config_deprecation_t *d; + const config_deprecation_t *d; for (d = fmt->deprecations; d->name; ++d) { if (!strcasecmp(d->name, key)) { return d->why_deprecated ? d->why_deprecated : ""; @@ -486,10 +486,11 @@ config_mark_lists_fragile(const config_format_t *fmt, void *options) void warn_deprecated_option(const char *what, const char *why) { + const char *space = (why && strlen(why)) ? " " : ""; log_warn(LD_CONFIG, "The %s option is deprecated, and will most likely " - "be removed in a future version of Tor.%s (If you think this is " + "be removed in a future version of Tor.%s%s (If you think this is " "a mistake, please let us know!)", - what, why); + what, space, why); } /** If <b>c</b> is a syntactically valid configuration line, update |