dovecot: "section changed at line" was always reporting the curr...

dovecot at dovecot.org dovecot at dovecot.org
Mon Dec 3 11:45:28 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/a201579e585d
changeset: 6906:a201579e585d
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Dec 03 11:45:24 2007 +0200
description:
"section changed at line" was always reporting the current line instead of
the previous section change line.

diffstat:

1 file changed, 5 insertions(+), 4 deletions(-)
src/lib-settings/settings.c |    9 +++++----

diffs (26 lines):

diff -r 8c779f3e16be -r a201579e585d src/lib-settings/settings.c
--- a/src/lib-settings/settings.c	Mon Dec 03 11:25:49 2007 +0200
+++ b/src/lib-settings/settings.c	Mon Dec 03 11:45:24 2007 +0200
@@ -201,7 +201,6 @@ bool settings_read(const char *path, con
 			if (*line != '{')
 				errormsg = "Expecting '='";
 			else {
-				last_section_line = linenum;
 				sections++;
 				if (next_section != NULL &&
 				    strcmp(next_section, name) == 0) {
@@ -229,9 +228,11 @@ bool settings_read(const char *path, con
 					    last_section_line != 0) {
 						errormsg = t_strdup_printf(
 							SECTION_ERRORMSG,
-							errormsg, linenum);
-					}
-				}
+							errormsg,
+							last_section_line);
+					}
+				}
+				last_section_line = linenum;
 			}
 		} else {
 			/* c) */


More information about the dovecot-cvs mailing list