From: Timo Sirainen Date: Thu, 16 Oct 2008 12:00:44 +0000 (+0300) Subject: mbox: Replaced EBADMSG errno for invalid mboxes with EINVAL to fix compiling with... X-Git-Tag: 1.2.alpha3~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5bfe0d3dd969dfb7e778af7bfab095a9628bee5e;p=thirdparty%2Fdovecot%2Fcore.git mbox: Replaced EBADMSG errno for invalid mboxes with EINVAL to fix compiling with OpenBSD. The errno is used only for logging purposes so it doesn't really matter what it is. --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/mbox/istream-raw-mbox.c b/src/lib-storage/index/mbox/istream-raw-mbox.c index 0a2564aba0..fa253c9ac5 100644 --- a/src/lib-storage/index/mbox/istream-raw-mbox.c +++ b/src/lib-storage/index/mbox/istream-raw-mbox.c @@ -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; }