dovecot-2.0: settings_parse_stream_read(): Try using existing da...

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 20 17:17:28 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/07059f9aead8
changeset: 10786:07059f9aead8
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Feb 20 15:16:40 2010 +0200
description:
settings_parse_stream_read(): Try using existing data from stream first.

diffstat:

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

diffs (20 lines):

diff -r eb3b89650eaf -r 07059f9aead8 src/lib-settings/settings-parser.c
--- a/src/lib-settings/settings-parser.c	Sat Feb 20 12:30:38 2010 +0200
+++ b/src/lib-settings/settings-parser.c	Sat Feb 20 15:16:40 2010 +0200
@@ -794,14 +794,14 @@
 {
 	int ret;
 
-	while ((ret = i_stream_read(input)) > 0) {
+	do {
 		if ((ret = settings_parse_stream(ctx, input)) < 0)
 			return -1;
 		if (ret == 0) {
 			/* empty line read */
 			return 0;
 		}
-	}
+	} while ((ret = i_stream_read(input)) > 0);
 
 	switch (ret) {
 	case -1:


More information about the dovecot-cvs mailing list