dovecot-2.0: doveconf: When logging an obsolete warning, log a n...

dovecot at dovecot.org dovecot at dovecot.org
Thu Aug 26 22:06:52 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/c5111fb65b0b
changeset: 12047:c5111fb65b0b
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Aug 26 20:06:49 2010 +0100
description:
doveconf: When logging an obsolete warning, log a note about using doveconf.

diffstat:

 src/config/old-set-parser.c |  7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diffs (19 lines):

diff -r e7dd800e1e3c -r c5111fb65b0b src/config/old-set-parser.c
--- a/src/config/old-set-parser.c	Tue Aug 24 18:10:31 2010 +0100
+++ b/src/config/old-set-parser.c	Thu Aug 26 20:06:49 2010 +0100
@@ -38,8 +38,15 @@
 static void ATTR_FORMAT(2, 3)
 obsolete(struct config_parser_context *ctx, const char *str, ...)
 {
+	static bool seen_obsoletes = FALSE;
 	va_list args;
 
+	if (!seen_obsoletes) {
+		i_warning("NOTE: You can get a new clean config file with: "
+			  "doveconf -n > dovecot-new.conf");
+		seen_obsoletes = TRUE;
+	}
+
 	va_start(args, str);
 	i_warning("Obsolete setting in %s:%u: %s",
 		  ctx->cur_input->path, ctx->cur_input->linenum,


More information about the dovecot-cvs mailing list