dovecot-1.2: mbox: Replaced EBADMSG errno for invalid mboxes wit...

dovecot at dovecot.org dovecot at dovecot.org
Thu Oct 16 15:01:10 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/444f0d5bfcbc
changeset: 8279:444f0d5bfcbc
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Oct 16 15:00:44 2008 +0300
description:
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.

diffstat:

1 file changed, 2 insertions(+), 2 deletions(-)
src/lib-storage/index/mbox/istream-raw-mbox.c |    4 ++--

diffs (21 lines):

diff -r 6b23fa31c553 -r 444f0d5bfcbc src/lib-storage/index/mbox/istream-raw-mbox.c
--- a/src/lib-storage/index/mbox/istream-raw-mbox.c	Thu Oct 16 14:58:51 2008 +0300
+++ b/src/lib-storage/index/mbox/istream-raw-mbox.c	Thu Oct 16 15:00:44 2008 +0300
@@ -84,7 +84,7 @@ static int mbox_read_from_line(struct ra
 	    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(st
 			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;
 	}


More information about the dovecot-cvs mailing list