dovecot-2.0: istream-attachment: Error handling improvements.
dovecot at dovecot.org
dovecot at dovecot.org
Thu Nov 4 18:25:43 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/455bea720c13
changeset: 12385:455bea720c13
user: Timo Sirainen <tss at iki.fi>
date: Thu Nov 04 16:25:39 2010 +0000
description:
istream-attachment: Error handling improvements.
diffstat:
src/lib-storage/index/istream-attachment.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (20 lines):
diff -r 71e13b4a44d4 -r 455bea720c13 src/lib-storage/index/istream-attachment.c
--- a/src/lib-storage/index/istream-attachment.c Thu Nov 04 16:25:18 2010 +0000
+++ b/src/lib-storage/index/istream-attachment.c Thu Nov 04 16:25:39 2010 +0000
@@ -53,10 +53,14 @@
stream->istream.eof = TRUE;
} else if (!stream->istream.eof) {
/* still more to read */
+ } else if (stream->istream.stream_errno == ENOENT) {
+ /* lost the file */
} else {
i_error("Attachment file %s smaller than expected "
- "(%"PRIuUOFF_T")", i_stream_get_name(stream->parent),
- astream->size);
+ "(%"PRIuUOFF_T" < %"PRIuUOFF_T")",
+ i_stream_get_name(stream->parent),
+ stream->istream.v_offset, astream->size);
+ stream->istream.stream_errno = EIO;
}
ret = pos > stream->pos ? (ssize_t)(pos - stream->pos) :
More information about the dovecot-cvs
mailing list