summaryrefslogtreecommitdiff
path: root/src/lib/confmgt
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-11-07 09:14:44 -0500
committerNick Mathewson <nickm@torproject.org>2019-11-07 09:14:44 -0500
commit36af84ba5062b26d2ede647627e87f6ae74796cf (patch)
tree9422788a4c8915f0baa740081832ae050157abf6 /src/lib/confmgt
parentf6c9ca3a1d1c29a293915612e26cdbfeb050c192 (diff)
downloadtor-36af84ba5062b26d2ede647627e87f6ae74796cf.tar.gz
tor-36af84ba5062b26d2ede647627e87f6ae74796cf.zip
New configuration flag to warn that a variable is obsolete.
Part of 32404.
Diffstat (limited to 'src/lib/confmgt')
-rw-r--r--src/lib/confmgt/confmgt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/confmgt/confmgt.c b/src/lib/confmgt/confmgt.c
index a96c7f96bf..c72efa847c 100644
--- a/src/lib/confmgt/confmgt.c
+++ b/src/lib/confmgt/confmgt.c
@@ -657,6 +657,11 @@ config_assign_value(const config_mgr_t *mgr, void *options,
tor_assert(!strcmp(c->key, var->cvar->member.name));
void *object = config_mgr_get_obj_mutable(mgr, options, var->object_idx);
+ if (config_var_has_flag(var->cvar, CFLG_WARN_OBSOLETE)) {
+ log_warn(LD_GENERAL, "Skipping obsolete configuration option \"%s\".",
+ var->cvar->member.name);
+ }
+
return struct_var_kvassign(object, c, msg, &var->cvar->member);
}