]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
fix
authorTimo Sirainen <tss@iki.fi>
Mon, 10 Nov 2003 21:53:23 +0000 (23:53 +0200)
committerTimo Sirainen <tss@iki.fi>
Mon, 10 Nov 2003 21:53:23 +0000 (23:53 +0200)
--HG--
branch : HEAD

src/lib-index/mbox/mbox-append.c

index d5d2764e9aa5de853eeebd8ad11a54aee269690a..64d82685afd6eb112f1b6db8187f2e33a012208c 100644 (file)
@@ -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 */