From: Timo Sirainen Date: Mon, 10 Nov 2003 21:53:23 +0000 (+0200) Subject: fix X-Git-Tag: 1.1.alpha1~4229 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a197fecbc0350f0f035c875d0616ecf4eaf49b72;p=thirdparty%2Fdovecot%2Fcore.git fix --HG-- branch : HEAD --- diff --git a/src/lib-index/mbox/mbox-append.c b/src/lib-index/mbox/mbox-append.c index d5d2764e9a..64d82685af 100644 --- a/src/lib-index/mbox/mbox-append.c +++ b/src/lib-index/mbox/mbox-append.c @@ -37,7 +37,7 @@ static int mbox_index_append_next(struct mail_index *index, } if (size == 0) - return -1; + return -2; if (pos == size || size <= 5 || memcmp(data, "From ", 5) != 0) { /* a) no \n found, or line too long @@ -204,15 +204,16 @@ int mbox_index_append_stream(struct mail_index *index, struct istream *input) } } - if (input->eof) { - ret = 1; - break; - } - t_push(); ret = mbox_index_append_next(index, trans_ctx, input); t_pop(); + if (ret == -2) { + /* EOF */ + ret = 1; + break; + } + if (ret == 0) { /* we want to rescan this message with exclusive locking */