dovecot-2.0: lib-settings: Give a better error message for inval...

dovecot at dovecot.org dovecot at dovecot.org
Tue Sep 14 16:45:07 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/2d80fc07124a
changeset: 12112:2d80fc07124a
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Sep 14 14:45:01 2010 +0100
description:
lib-settings: Give a better error message for invalid boolean values

diffstat:

 src/lib-settings/settings-parser.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (14 lines):

diff -r 8bd2bd410c73 -r 2d80fc07124a src/lib-settings/settings-parser.c
--- a/src/lib-settings/settings-parser.c	Tue Sep 14 13:45:57 2010 +0100
+++ b/src/lib-settings/settings-parser.c	Tue Sep 14 14:45:01 2010 +0100
@@ -298,8 +298,8 @@
 	else if (strcasecmp(value, "no") == 0)
 		*result_r = FALSE;
 	else {
-		ctx->error = p_strconcat(ctx->parser_pool, "Invalid boolean: ",
-					 value, NULL);
+		ctx->error = p_strdup_printf(ctx->parser_pool,
+			"Invalid boolean value: %s (use yes or no)", value);
 		return -1;
 	}
 


More information about the dovecot-cvs mailing list