dovecot-2.2: istream-chain/concat/seekable: When child stream fa...

dovecot at dovecot.org dovecot at dovecot.org
Fri Sep 20 00:20:36 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/0eee8caeaa53
changeset: 16775:0eee8caeaa53
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Sep 20 00:20:19 2013 +0300
description:
istream-chain/concat/seekable: When child stream fails, copy its error to ourself.

diffstat:

 src/lib/istream-chain.c    |  4 ++++
 src/lib/istream-concat.c   |  4 ++++
 src/lib/istream-seekable.c |  4 ++++
 3 files changed, 12 insertions(+), 0 deletions(-)

diffs (42 lines):

diff -r 28df180ec3ab -r 0eee8caeaa53 src/lib/istream-chain.c
--- a/src/lib/istream-chain.c	Fri Sep 20 00:14:11 2013 +0300
+++ b/src/lib/istream-chain.c	Fri Sep 20 00:20:19 2013 +0300
@@ -203,6 +203,10 @@
 
 		if (ret == -1) {
 			if (link->stream->stream_errno != 0) {
+				io_stream_set_error(&stream->iostream,
+					"read(%s) failed: %s",
+					i_stream_get_name(link->stream),
+					i_stream_get_error(link->stream));
 				stream->istream.stream_errno =
 					link->stream->stream_errno;
 				return -1;
diff -r 28df180ec3ab -r 0eee8caeaa53 src/lib/istream-concat.c
--- a/src/lib/istream-concat.c	Fri Sep 20 00:14:11 2013 +0300
+++ b/src/lib/istream-concat.c	Fri Sep 20 00:20:19 2013 +0300
@@ -133,6 +133,10 @@
 			return ret;
 
 		if (ret == -1 && cstream->cur_input->stream_errno != 0) {
+			io_stream_set_error(&cstream->istream.iostream,
+				"read(%s) failed: %s",
+				i_stream_get_name(cstream->cur_input),
+				i_stream_get_error(cstream->cur_input));
 			stream->istream.stream_errno =
 				cstream->cur_input->stream_errno;
 			return -1;
diff -r 28df180ec3ab -r 0eee8caeaa53 src/lib/istream-seekable.c
--- a/src/lib/istream-seekable.c	Fri Sep 20 00:14:11 2013 +0300
+++ b/src/lib/istream-seekable.c	Fri Sep 20 00:20:19 2013 +0300
@@ -139,6 +139,10 @@
 
 	while ((ret = i_stream_read(sstream->cur_input)) == -1) {
 		if (sstream->cur_input->stream_errno != 0) {
+			io_stream_set_error(&sstream->istream.iostream,
+				"read(%s) failed: %s",
+				i_stream_get_name(sstream->cur_input),
+				i_stream_get_error(sstream->cur_input));
 			sstream->istream.istream.stream_errno =
 				sstream->cur_input->stream_errno;
 			return -1;


More information about the dovecot-cvs mailing list