dovecot: i_stream_read_next_line(): Try to read the next line un...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Nov 7 05:46:50 EET 2007
details: http://hg.dovecot.org/dovecot/rev/e1ec38002b2b
changeset: 6720:e1ec38002b2b
user: Timo Sirainen <tss at iki.fi>
date: Wed Nov 07 05:46:45 2007 +0200
description:
i_stream_read_next_line(): Try to read the next line until we get it or
i_stream_read() fails.
diffstat:
1 file changed, 7 insertions(+), 5 deletions(-)
src/lib/istream.c | 12 +++++++-----
diffs (23 lines):
diff -r 1efa924b134b -r e1ec38002b2b src/lib/istream.c
--- a/src/lib/istream.c Wed Nov 07 01:30:38 2007 +0200
+++ b/src/lib/istream.c Wed Nov 07 05:46:45 2007 +0200
@@ -196,12 +196,14 @@ char *i_stream_read_next_line(struct ist
{
char *line;
- line = i_stream_next_line(stream);
- if (line != NULL)
- return line;
-
- if (i_stream_read(stream) > 0)
+ for (;;) {
line = i_stream_next_line(stream);
+ if (line != NULL)
+ break;
+
+ if (i_stream_read(stream) <= 0)
+ return NULL;
+ }
return line;
}
More information about the dovecot-cvs
mailing list