dovecot-2.0-sslstream: lib-settings: Added settings_check() to c...

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 13 02:55:17 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0-sslstream/rev/a16c9fbfe22c
changeset: 10110:a16c9fbfe22c
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Oct 20 18:03:34 2009 -0400
description:
lib-settings: Added settings_check() to check specific setting structure.

diffstat:

2 files changed, 9 insertions(+), 9 deletions(-)
src/lib-settings/settings-parser.c |   16 +++++++---------
src/lib-settings/settings-parser.h |    2 ++

diffs (52 lines):

diff -r 9cd71f3a6f96 -r a16c9fbfe22c src/lib-settings/settings-parser.c
--- a/src/lib-settings/settings-parser.c	Tue Oct 20 18:02:00 2009 -0400
+++ b/src/lib-settings/settings-parser.c	Tue Oct 20 18:03:34 2009 -0400
@@ -690,9 +690,8 @@ int settings_parse_exec(struct setting_p
 	return ret;
 }
 
-static bool
-settings_parser_check_info(const struct setting_parser_info *info, pool_t pool,
-			   void *set, const char **error_r)
+bool settings_check(const struct setting_parser_info *info, pool_t pool,
+		    void *set, const char **error_r)
 {
 	const struct setting_define *def;
 	const ARRAY_TYPE(void_array) *val;
@@ -714,8 +713,8 @@ settings_parser_check_info(const struct 
 
 		children = array_get(val, &count);
 		for (i = 0; i < count; i++) {
-			if (!settings_parser_check_info(def->list_info, pool,
-							children[i], error_r))
+			if (!settings_check(def->list_info, pool,
+					    children[i], error_r))
 				return FALSE;
 		}
 	}
@@ -728,10 +727,9 @@ bool settings_parser_check(struct settin
 	unsigned int i;
 
 	for (i = 0; i < ctx->root_count; i++) {
-		if (!settings_parser_check_info(ctx->roots[i].info, pool,
-						ctx->roots[i].set_struct,
-						error_r))
-		    return FALSE;
+		if (!settings_check(ctx->roots[i].info, pool,
+				    ctx->roots[i].set_struct, error_r))
+			return FALSE;
 	}
 	return TRUE;
 }
diff -r 9cd71f3a6f96 -r a16c9fbfe22c src/lib-settings/settings-parser.h
--- a/src/lib-settings/settings-parser.h	Tue Oct 20 18:02:00 2009 -0400
+++ b/src/lib-settings/settings-parser.h	Tue Oct 20 18:03:34 2009 -0400
@@ -129,6 +129,8 @@ int settings_parse_exec(struct setting_p
 /* Call all check_func()s to see if currently parsed settings are valid. */
 bool settings_parser_check(struct setting_parser_context *ctx, pool_t pool,
 			   const char **error_r);
+bool settings_check(const struct setting_parser_info *info, pool_t pool,
+		    void *set, const char **error_r);
 
 /* While parsing values, specifies if STR_VARS strings are already expanded. */
 void settings_parse_set_expanded(struct setting_parser_context *ctx,


More information about the dovecot-cvs mailing list