dovecot-2.2: ostream: If stream is closed with stream_errno=0, s...

dovecot at dovecot.org dovecot at dovecot.org
Thu Jan 31 22:59:18 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/4a59737dd2ca
changeset: 15708:4a59737dd2ca
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jan 31 22:59:13 2013 +0200
description:
ostream: If stream is closed with stream_errno=0, set it to EPIPE.

diffstat:

 src/lib/ostream.c |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff -r 07ee9842a00b -r 4a59737dd2ca src/lib/ostream.c
--- a/src/lib/ostream.c	Thu Jan 31 22:58:24 2013 +0200
+++ b/src/lib/ostream.c	Thu Jan 31 22:59:13 2013 +0200
@@ -55,6 +55,9 @@
 {
 	io_stream_close(&stream->real_stream->iostream);
 	stream->closed = TRUE;
+
+	if (stream->stream_errno == 0)
+		stream->stream_errno = EPIPE;
 }
 
 #undef o_stream_set_flush_callback


More information about the dovecot-cvs mailing list