static void config_maybe_load_geoip_files_(const or_options_t *options,
const or_options_t *old_options);
static int options_validate_cb(void *old_options, void *options,
- void *default_options,
- int from_setconf, char **msg);
+ char **msg);
static void cleanup_protocol_warning_severity_level(void);
static void set_protocol_warning_severity_level(int warning_severity);
static void options_clear_cb(const config_mgr_t *mgr, void *opts);
#define RECOMMENDED_MIN_CIRCUIT_BUILD_TIMEOUT (10)
static int
-options_validate_cb(void *old_options, void *options, void *default_options,
- int from_setconf, char **msg)
+options_validate_cb(void *old_options, void *options, char **msg)
{
in_option_validation = 1;
- int rv = options_validate(old_options, options, default_options,
- from_setconf, msg);
+ int rv = options_validate(old_options, options, NULL, 0, msg);
in_option_validation = 0;
return rv;
}
static int or_state_validate(or_state_t *state, char **msg);
-static int or_state_validate_cb(void *old_options, void *options,
- void *default_options,
- int from_setconf, char **msg);
+static int or_state_validate_cb(void *old_options,
+ void *options, char **msg);
/** Magic value for or_state_t. */
#define OR_STATE_MAGIC 0x57A73f57
}
static int
-or_state_validate_cb(void *old_state, void *state, void *default_state,
- int from_setconf, char **msg)
+or_state_validate_cb(void *old_state, void *state, char **msg)
{
/* We don't use these; only options do. Still, we need to match that
* signature. */
- (void) from_setconf;
- (void) default_state;
(void) old_state;
return or_state_validate(state, msg);
#define SR_DISK_STATE_MAGIC 0x98AB1254
static int
-disk_state_validate_cb(void *old_state, void *state, void *default_state,
- int from_setconf, char **msg);
+disk_state_validate_cb(void *old_state, void *state, char **msg);
/** Array of variables that are saved to disk as a persistent state. */
static const config_var_t state_vars[] = {
/** Validate the disk state (NOP for now). */
static int
-disk_state_validate_cb(void *old_state, void *state, void *default_state,
- int from_setconf, char **msg)
+disk_state_validate_cb(void *old_state, void *state, char **msg)
{
/* We don't use these; only options do. */
- (void) from_setconf;
- (void) default_state;
(void) old_state;
/* This is called by config_dump which is just before we are about to
/* 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, defaults_tmp, 1, &msg) < 0) {
+ if (fmt->validate_fn(NULL, defaults_tmp, &msg) < 0) {
// LCOV_EXCL_START
log_err(LD_BUG, "Failed to validate default config: %s", msg);
tor_free(msg);
*/
typedef int (*validate_fn_t)(void *oldval,
void *newval,
- void *default_val,
- int from_setconf,
char **msg_out);
struct config_mgr_t;
};
static int
-test_validate_cb(void *old_options, void *options, void *default_options,
- int from_setconf, char **msg)
+test_validate_cb(void *old_options, void *options, char **msg)
{
(void)old_options;
- (void)default_options;
- (void)from_setconf;
(void)msg;
test_struct_t *ts = options;