changeset 1308:f19fbca465fb HEAD

We didn't stop after reading literal size. This broke using non-synced literals with APPEND.
author Timo Sirainen <tss@iki.fi>
date Thu, 20 Mar 2003 19:06:23 +0200
parents e360dc131150
children 326e0826467c
files src/lib-imap/imap-parser.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-imap/imap-parser.c	Wed Mar 19 16:25:06 2003 +0200
+++ b/src/lib-imap/imap-parser.c	Thu Mar 20 19:06:23 2003 +0200
@@ -560,8 +560,8 @@
 {
 	parser->flags = flags;
 
-	while (count == 0 || parser->root_list->size < count ||
-	       IS_UNFINISHED(parser)) {
+	while (!parser->eol && (count == 0 || parser->root_list->size < count ||
+				IS_UNFINISHED(parser))) {
 		if (!imap_parser_read_arg(parser))
 			break;
 
@@ -580,7 +580,7 @@
 	} else if ((!IS_UNFINISHED(parser) && count > 0 &&
 		    parser->root_list->size >= count) || parser->eol) {
 		/* all arguments read / end of line. */
-		i_stream_skip(parser->input, parser->cur_pos);
+ 		i_stream_skip(parser->input, parser->cur_pos);
 		parser->cur_pos = 0;
 
 		if (parser->list_arg != NULL) {