]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mbox: Replaced EBADMSG errno for invalid mboxes with EINVAL to fix compiling with...
authorTimo Sirainen <tss@iki.fi>
Thu, 16 Oct 2008 12:00:44 +0000 (15:00 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 16 Oct 2008 12:00:44 +0000 (15:00 +0300)
The errno is used only for logging purposes so it doesn't really matter what
it is.

--HG--
branch : HEAD

src/lib-storage/index/mbox/istream-raw-mbox.c

index 0a2564aba082d19c3c375db8286378007ecedfa4..fa253c9ac588978ed1f91726280e7ffbb391ca26 100644 (file)
@@ -84,7 +84,7 @@ static int mbox_read_from_line(struct raw_mbox_istream *rstream)
            mbox_from_parse(buf+5, pos-5, &received_time, &tz, &sender) < 0) {
                /* broken From - should happen only at beginning of
                   file if this isn't a mbox.. */
-               rstream->istream.istream.stream_errno = EBADMSG;
+               rstream->istream.istream.stream_errno = EINVAL;
                return -1;
        }
 
@@ -309,7 +309,7 @@ static ssize_t i_stream_raw_mbox_read(struct istream_private *stream)
                        rstream->hdr_offset + rstream->mail_size);
                rstream->eof = TRUE;
                rstream->corrupted = TRUE;
-               rstream->istream.istream.stream_errno = EBADMSG;
+               rstream->istream.istream.stream_errno = EINVAL;
                stream->pos = 0;
                return -1;
        }