aboutsummaryrefslogtreecommitdiff
path: root/src/lib/confmgt
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-10-23 14:39:20 -0400
committerNick Mathewson <nickm@torproject.org>2019-10-24 20:30:32 -0400
commit4a248bafba0136ded8370de672c0b27b912bbede (patch)
treef1db4023fe626d3f946890d06777d073599add86 /src/lib/confmgt
parent24ee44df90d12eb98ba5a39638963696ce2f8012 (diff)
downloadtor-4a248bafba0136ded8370de672c0b27b912bbede.tar.gz
tor-4a248bafba0136ded8370de672c0b27b912bbede.zip
Rename validate_fn{,_t} to start with "legacy_".
The current API of this callback mixes responsibilities, including: * validation * transition checking * processing (modifying) the configuration object. These will have to be disentangled piece by piece, so for now, we'll have "legacy" validate functions as well. This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ validate_fn_t legacy_validate_fn_t \ validate_fn legacy_validate_fn
Diffstat (limited to 'src/lib/confmgt')
-rw-r--r--src/lib/confmgt/confparse.c2
-rw-r--r--src/lib/confmgt/confparse.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/confmgt/confparse.c b/src/lib/confmgt/confparse.c
index 323c88a31c..96eba610bb 100644
--- a/src/lib/confmgt/confparse.c
+++ b/src/lib/confmgt/confparse.c
@@ -1166,7 +1166,7 @@ config_dump(const config_mgr_t *mgr, const void *default_options,
/* XXX use a 1 here so we don't add a new log line while dumping */
if (default_options == NULL) {
- if (fmt->validate_fn(NULL, defaults_tmp, &msg) < 0) {
+ if (fmt->legacy_validate_fn(NULL, defaults_tmp, &msg) < 0) {
// LCOV_EXCL_START
log_err(LD_BUG, "Failed to validate default config: %s", msg);
tor_free(msg);
diff --git a/src/lib/confmgt/confparse.h b/src/lib/confmgt/confparse.h
index 8d7278cb04..d50d6d8143 100644
--- a/src/lib/confmgt/confparse.h
+++ b/src/lib/confmgt/confparse.h
@@ -68,7 +68,7 @@ typedef struct config_deprecation_t {
* config_dump(); later in our refactoring, it will be cleaned up and used
* more generally.
*/
-typedef int (*validate_fn_t)(const void *oldval,
+typedef int (*legacy_validate_fn_t)(const void *oldval,
void *newval,
char **msg_out);
@@ -98,7 +98,7 @@ typedef struct config_format_t {
const config_var_t *vars; /**< List of variables we recognize, their default
* values, and where we stick them in the
* structure. */
- validate_fn_t validate_fn; /**< Function to validate config. */
+ legacy_validate_fn_t legacy_validate_fn; /**< Function to validate config. */
clear_cfg_fn_t clear_fn; /**< Function to clear the configuration. */
/** If present, extra denotes a LINELIST variable for unrecognized
* lines. Otherwise, unrecognized lines are an error. */