]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
settings_parse_stream_read(): Try using existing data from stream first.
authorTimo Sirainen <tss@iki.fi>
Sat, 20 Feb 2010 13:16:40 +0000 (15:16 +0200)
committerTimo Sirainen <tss@iki.fi>
Sat, 20 Feb 2010 13:16:40 +0000 (15:16 +0200)
--HG--
branch : HEAD

src/lib-settings/settings-parser.c

index 4f4f96cc5b466c65d0f8538e4e536edeb7f270ea..3399a7ac278172beefb70b79a2e4955b617c8739 100644 (file)
@@ -794,14 +794,14 @@ int settings_parse_stream_read(struct setting_parser_context *ctx,
 {
        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: