]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
If read() from a mail stream fails, log the stream name (filename typically).
authorTimo Sirainen <tss@iki.fi>
Mon, 31 May 2010 14:12:57 +0000 (15:12 +0100)
committerTimo Sirainen <tss@iki.fi>
Mon, 31 May 2010 14:12:57 +0000 (15:12 +0100)
--HG--
branch : HEAD

src/imap/imap-fetch-body.c
src/lib-storage/index/index-mail.c

index 94ba0b842045c7a2243f3b5b87cd0f04f1a8f717..6882cfbaa5159b72b1e2713c55bf0c33129e0c06 100644 (file)
@@ -9,7 +9,7 @@
 #include "istream-header-filter.h"
 #include "message-parser.h"
 #include "message-send.h"
-#include "mail-storage.h"
+#include "mail-storage-private.h"
 #include "imap-parser.h"
 #include "imap-fetch.h"
 
@@ -46,8 +46,9 @@ static struct partial_cache last_partial = { 0, 0, 0, 0, { 0, 0, 0 } };
 static void fetch_read_error(struct imap_fetch_context *ctx)
 {
        errno = ctx->cur_input->stream_errno;
-       i_error("FETCH for mailbox %s UID %u "
-               "failed to read message input: %m",
+       mail_storage_set_critical(ctx->box->storage,
+               "read(%s) failed: %m (FETCH for mailbox %s UID %u)",
+               i_stream_get_name(ctx->cur_input),
                mailbox_get_vname(ctx->mail->box), ctx->mail->uid);
 }
 
index 6b8ec8cd31232e38aad17d2e17144f6f309251e8..0f2f1735e2854f93e39cc378d9e54a9ed1549fc2 100644 (file)
@@ -757,7 +757,8 @@ static int index_mail_stream_check_failure(struct index_mail *mail)
 
        errno = mail->data.stream->stream_errno;
        mail_storage_set_critical(mail->mail.mail.box->storage,
-               "read(mail, uid=%u) failed: %m", mail->mail.mail.uid);
+               "read(%s) failed: %m (uid=%u)",
+               i_stream_get_name(mail->data.stream), mail->mail.mail.uid);
        return -1;
 }