const char *path, *error;
path = master_service_get_config_path(master_service);
- if (config_parse_file(path, CONFIG_PARSE_FLAG_EXPAND_VALUES, NULL, &error) <= 0) {
+ if (config_parse_file(path, CONFIG_PARSE_FLAG_EXPAND_VALUES, &error) <= 0) {
o_stream_nsend_str(conn->output,
t_strconcat("-", error, "\n", NULL));
return 0;
}
int config_parse_file(const char *path, enum config_parse_flags flags,
- const char *const *modules, const char **error_r)
+ const char **error_r)
{
struct input_stack root;
struct config_parser_context ctx;
root.path = path;
ctx.cur_input = &root;
ctx.expand_values = (flags & CONFIG_PARSE_FLAG_EXPAND_VALUES) != 0;
- ctx.modules = modules;
hash_table_create(&ctx.seen_settings, ctx.pool, 0, str_hash, strcmp);
p_array_init(&ctx.all_parsers, ctx.pool, 128);
int config_parse_net(const char *value, struct ip_addr *ip_r,
unsigned int *bits_r, const char **error_r);
int config_parse_file(const char *path, enum config_parse_flags flags,
- const char *const *modules, const char **error_r)
+ const char **error_r)
ATTR_NULL(3);
void config_parse_load_modules(void);
if (expand_vars)
flags |= CONFIG_PARSE_FLAG_EXPAND_VALUES;
if ((ret = config_parse_file(dump_defaults ? NULL : config_path,
- flags, NULL,
- &error)) == 0 &&
+ flags, &error)) == 0 &&
access(EXAMPLE_CONFIG_DIR, X_OK) == 0) {
i_fatal("%s (copy example configs from "EXAMPLE_CONFIG_DIR"/)",
error);
config_parse_load_modules();
path = master_service_get_config_path(master_service);
- if (config_parse_file(path, CONFIG_PARSE_FLAG_EXPAND_VALUES, NULL, &error) <= 0)
+ if (config_parse_file(path, CONFIG_PARSE_FLAG_EXPAND_VALUES, &error) <= 0)
i_fatal("%s", error);
/* notify about our success only after successfully parsing the
putenv("bar=test2");
putenv("FOO$ENV:FOO=works");
- test_assert(config_parse_file(TEST_CONFIG_FILE, CONFIG_PARSE_FLAG_EXPAND_VALUES, NULL, &error) == 1);
+ test_assert(config_parse_file(TEST_CONFIG_FILE, CONFIG_PARSE_FLAG_EXPAND_VALUES, &error) == 1);
if (error != NULL)
i_error("config_parse_file(): %s", error);
test_assert_strcmp(set->protocols, "pop3 imap");
/* try again unexpanded */
- test_assert(config_parse_file(TEST_CONFIG_FILE, 0, NULL, &error) == 1);
+ test_assert(config_parse_file(TEST_CONFIG_FILE, 0, &error) == 1);
set = settings_parser_get(config_module_parsers[0].parser);
test_assert_strcmp(set->key, "value");