aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.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/config.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/config.c')
-rw-r--r--src/or/config.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/config.c b/src/or/config.c
index b6ea089c4e..a57b83e050 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -2186,14 +2186,13 @@ option_get_assignment(const or_options_t *options, const char *key)
* what went wrong.
*/
setopt_err_t
-options_trial_assign(config_line_t *list, int use_defaults,
- int clear_first, char **msg)
+options_trial_assign(config_line_t *list, unsigned flags, char **msg)
{
int r;
or_options_t *trial_options = config_dup(&options_format, get_options());
if ((r=config_assign(&options_format, trial_options,
- list, use_defaults, clear_first, msg)) < 0) {
+ list, flags, msg)) < 0) {
config_free(&options_format, trial_options);
return r;
}
@@ -4899,7 +4898,8 @@ options_init_from_string(const char *cf_defaults, const char *cf,
err = SETOPT_ERR_PARSE;
goto err;
}
- retval = config_assign(&options_format, newoptions, cl, 0, 0, msg);
+ retval = config_assign(&options_format, newoptions, cl,
+ CAL_WARN_DEPRECATIONS, msg);
config_free_lines(cl);
if (retval < 0) {
err = SETOPT_ERR_PARSE;
@@ -4915,7 +4915,7 @@ options_init_from_string(const char *cf_defaults, const char *cf,
/* Go through command-line variables too */
retval = config_assign(&options_format, newoptions,
- global_cmdline_options, 0, 0, msg);
+ global_cmdline_options, CAL_WARN_DEPRECATIONS, msg);
if (retval < 0) {
err = SETOPT_ERR_PARSE;
goto err;
@@ -4963,7 +4963,7 @@ options_init_from_string(const char *cf_defaults, const char *cf,
err = SETOPT_ERR_PARSE;
goto err;
}
- retval = config_assign(&options_format, newoptions, cl, 0, 0, msg);
+ retval = config_assign(&options_format, newoptions, cl, 0, msg);
config_free_lines(cl);
if (retval < 0) {
err = SETOPT_ERR_PARSE;
@@ -4974,7 +4974,7 @@ options_init_from_string(const char *cf_defaults, const char *cf,
}
/* Assign command-line variables a second time too */
retval = config_assign(&options_format, newoptions,
- global_cmdline_options, 0, 0, msg);
+ global_cmdline_options, 0, msg);
if (retval < 0) {
err = SETOPT_ERR_PARSE;
goto err;