dovecot-2.2: doveadm fetch: If istream reading fails, log a bett...

dovecot at dovecot.org dovecot at dovecot.org
Fri Oct 17 23:14:24 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/cd5dba84d8de
changeset: 17965:cd5dba84d8de
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Oct 18 02:13:30 2014 +0300
description:
doveadm fetch: If istream reading fails, log a better error message.

diffstat:

 src/doveadm/doveadm-mail-fetch.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (43 lines):

diff -r b0bc1fac94a3 -r cd5dba84d8de src/doveadm/doveadm-mail-fetch.c
--- a/src/doveadm/doveadm-mail-fetch.c	Sat Oct 18 02:12:47 2014 +0300
+++ b/src/doveadm/doveadm-mail-fetch.c	Sat Oct 18 02:13:30 2014 +0300
@@ -128,7 +128,8 @@
 		i_stream_skip(input, size);
 	}
 	if (input->stream_errno != 0) {
-		i_error("read() failed: %m");
+		i_error("read(%s) failed: %s", i_stream_get_name(input),
+			i_stream_get_error(input));
 		ret = -1;
 	}
 	i_stream_unref(&input);
@@ -222,7 +223,8 @@
 		i_stream_skip(input, size);
 	}
 	if (input->stream_errno != 0) {
-		i_error("read() failed: %m");
+		i_error("read(%s) failed: %s", i_stream_get_name(input),
+			i_stream_get_error(input));
 		ret = -1;
 	}
 	doveadm_print_stream("", 0);
@@ -248,7 +250,8 @@
 		i_stream_skip(input, size);
 	}
 	if (input->stream_errno != 0) {
-		i_error("read() failed: %m");
+		i_error("read(%s) failed: %s", i_stream_get_name(input),
+			i_stream_get_error(input));
 		ret = -1;
 	}
 	doveadm_print_stream("", 0);
@@ -300,7 +303,8 @@
 
 	doveadm_print_stream("", 0);
 	if (input->stream_errno != 0) {
-		i_error("read() failed: %m");
+		i_error("read(%s) failed: %s", i_stream_get_name(input),
+			i_stream_get_error(input));
 		return -1;
 	}
 	return 0;


More information about the dovecot-cvs mailing list