dovecot-2.2: imap: If FETCH fails, log the stream's error string...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Sep 20 00:22:23 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/c140de1b506b
changeset: 16776:c140de1b506b
user: Timo Sirainen <tss at iki.fi>
date: Fri Sep 20 00:22:15 2013 +0300
description:
imap: If FETCH fails, log the stream's error string instead of errno.
diffstat:
src/imap/cmd-append.c | 5 +++--
src/imap/cmd-urlfetch.c | 5 +++--
src/imap/imap-fetch-body.c | 3 ++-
3 files changed, 8 insertions(+), 5 deletions(-)
diffs (44 lines):
diff -r 0eee8caeaa53 -r c140de1b506b src/imap/cmd-append.c
--- a/src/imap/cmd-append.c Fri Sep 20 00:20:19 2013 +0300
+++ b/src/imap/cmd-append.c Fri Sep 20 00:22:15 2013 +0300
@@ -212,8 +212,9 @@
if (mpresult.input->stream_errno != 0) {
errno = mpresult.input->stream_errno;
mail_storage_set_critical(ctx->box->storage,
- "read(%s) failed: %m (for CATENATE URL %s)",
- i_stream_get_name(mpresult.input), caturl);
+ "read(%s) failed: %s (for CATENATE URL %s)",
+ i_stream_get_name(mpresult.input),
+ i_stream_get_error(mpresult.input), caturl);
client_send_storage_error(cmd, ctx->storage);
ret = -1;
} else if (!mpresult.input->eof) {
diff -r 0eee8caeaa53 -r c140de1b506b src/imap/cmd-urlfetch.c
--- a/src/imap/cmd-urlfetch.c Fri Sep 20 00:20:19 2013 +0300
+++ b/src/imap/cmd-urlfetch.c Fri Sep 20 00:22:15 2013 +0300
@@ -112,8 +112,9 @@
}
if (ctx->input->stream_errno != 0) {
errno = ctx->input->stream_errno;
- i_error("read(%s) failed: %m (URLFETCH)",
- i_stream_get_name(ctx->input));
+ i_error("read(%s) failed: %s (URLFETCH)",
+ i_stream_get_name(ctx->input),
+ i_stream_get_error(ctx->input));
client_disconnect(client, "URLFETCH failed");
return -1;
}
diff -r 0eee8caeaa53 -r c140de1b506b src/imap/imap-fetch-body.c
--- a/src/imap/imap-fetch-body.c Fri Sep 20 00:20:19 2013 +0300
+++ b/src/imap/imap-fetch-body.c Fri Sep 20 00:22:15 2013 +0300
@@ -33,8 +33,9 @@
errno = state->cur_input->stream_errno;
mail_storage_set_critical(state->cur_mail->box->storage,
- "read(%s) failed: %m (FETCH %s for mailbox %s UID %u)",
+ "read(%s) failed: %s (FETCH %s for mailbox %s UID %u)",
i_stream_get_name(state->cur_input),
+ i_stream_get_error(state->cur_input),
state->cur_human_name,
mailbox_get_vname(state->cur_mail->box), state->cur_mail->uid);
}
More information about the dovecot-cvs
mailing list