if (settings_parser_apply_changes(dest[i].parser,
src->parsers[i].parser, pool,
error_r) < 0) {
- *error_r = t_strdup_printf("Conflict in setting %s",
- *error_r);
+ *error_r = t_strdup_printf("Conflict in setting %s "
+ "found from filter at %s", *error_r,
+ src->file_and_line);
return -1;
}
}
struct config_filter_parser {
struct config_filter filter;
+ const char *file_and_line;
/* NULL-terminated array of parsers */
struct config_module_parser *parsers;
};
parser = p_new(ctx->pool, struct config_filter_parser, 1);
parser->filter = cur_section->filter;
+ parser->file_and_line =
+ p_strdup_printf(ctx->pool, "%s:%d",
+ ctx->cur_input->path, ctx->cur_input->linenum);
parser->parsers = cur_section->prev == NULL ? ctx->root_parsers :
config_module_parsers_init(ctx->pool);
array_append(&ctx->all_parsers, &parser, 1);
settings_parser_flags);
}
- p_array_init(&ctx.all_parsers, ctx.pool, 128);
- ctx.cur_section = p_new(ctx.pool, struct config_section_stack, 1);
- config_add_new_parser(&ctx);
-
memset(&root, 0, sizeof(root));
root.path = path;
ctx.cur_input = &root;
+ p_array_init(&ctx.all_parsers, ctx.pool, 128);
+ ctx.cur_section = p_new(ctx.pool, struct config_section_stack, 1);
+ config_add_new_parser(&ctx);
+
str = t_str_new(256);
full_line = t_str_new(512);
errormsg = NULL;