changeset 15273:f1f2a65d9a1c

lib-storage: Crashfix to previous stream error checking change.
author Timo Sirainen <tss@iki.fi>
date Mon, 29 Oct 2012 15:13:54 +0200
parents ca10d2e8d8e3
children a87edad22199
files src/lib-storage/index/index-mail-headers.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/index-mail-headers.c	Mon Oct 29 14:50:11 2012 +0200
+++ b/src/lib-storage/index/index-mail-headers.c	Mon Oct 29 15:13:54 2012 +0200
@@ -484,8 +484,14 @@
 		   envelope */
 		message_parse_header(stream, NULL, hdr_parser_flags,
 				     imap_envelope_parse_callback, mail);
-		if (index_mail_stream_check_failure(mail) < 0)
+		if (stream->stream_errno != 0) {
+			errno = stream->stream_errno;
+			mail_storage_set_critical(mail->mail.mail.box->storage,
+				"read(%s) failed: %m (uid=%u)",
+				i_stream_get_name(mail->data.stream),
+				mail->mail.mail.uid);
 			return -1;
+		}
 		mail->data.save_envelope = FALSE;
 	}