aboutsummaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-08-03 12:52:26 -0400
committerNick Mathewson <nickm@torproject.org>2016-08-03 12:52:26 -0400
commitf5dcab8072e4f8471cc0d4d8a28c79272467fb92 (patch)
treeb5ea4d3611c535bd5c617b06dcab4595f6adc3e1 /src/or/control.c
parentf3314aa6e1e307467a684f1477e2af1568a728b6 (diff)
downloadtor-f5dcab8072e4f8471cc0d4d8a28c79272467fb92.tar.gz
tor-f5dcab8072e4f8471cc0d4d8a28c79272467fb92.zip
Add new warn_deprecated option to config_assign*().
Also, collapse all the config_assign*() options into a flags argument, since having two boolean arguments was already confusing.
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 64a980de6c..9d453d2523 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -871,7 +871,8 @@ control_setconf_helper(control_connection_t *conn, uint32_t len, char *body,
config_line_t *lines=NULL;
char *start = body;
char *errstring = NULL;
- const int clear_first = 1;
+ const unsigned flags =
+ CAL_CLEAR_FIRST | (use_defaults ? CAL_USE_DEFAULTS : 0);
char *config;
smartlist_t *entries = smartlist_new();
@@ -931,7 +932,7 @@ control_setconf_helper(control_connection_t *conn, uint32_t len, char *body,
}
tor_free(config);
- opt_err = options_trial_assign(lines, use_defaults, clear_first, &errstring);
+ opt_err = options_trial_assign(lines, flags, &errstring);
{
const char *msg;
switch (opt_err) {