changeset 12193:65855df71cf4

doveconf: Skip verifying settings for modules we don't care about. This was done sometimes, but not always.
author Timo Sirainen <tss@iki.fi>
date Tue, 28 Sep 2010 17:09:29 +0100
parents 431dff6a6ae7
children 2bfe672e7c8a
files src/config/config-parser.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/config/config-parser.c	Tue Sep 28 16:29:33 2010 +0100
+++ b/src/config/config-parser.c	Tue Sep 28 17:09:29 2010 +0100
@@ -286,12 +286,13 @@
 			   const struct config_module_parser *p,
 			   const char **error_r)
 {
-	/* skip checking settings we don't care about */
-	if (*ctx->module != '\0' &&
-	    !config_module_want_parser(ctx->root_parsers, ctx->module, p->root))
-		return 0;
+	for (; p->root != NULL; p++) {
+		/* skip checking settings we don't care about */
+		if (*ctx->module != '\0' &&
+		    !config_module_want_parser(ctx->root_parsers,
+					       ctx->module, p->root))
+			continue;
 
-	for (; p->root != NULL; p++) {
 		settings_parse_var_skip(p->parser);
 		if (!settings_parser_check(p->parser, ctx->pool, error_r))
 			return -1;