dovecot-1.1: If stream is closed without stream_errno set, chang...

dovecot at dovecot.org dovecot at dovecot.org
Wed Mar 5 02:04:32 EET 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/32d555a08443
changeset: 7348:32d555a08443
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Mar 05 02:03:50 2008 +0200
description:
If stream is closed without stream_errno set, change it to ECONNRESET so if
there are any future reads they'll return it.

diffstat:

1 file changed, 3 insertions(+)
src/lib/istream.c |    3 +++

diffs (13 lines):

diff -r 34cc59e3da17 -r 32d555a08443 src/lib/istream.c
--- a/src/lib/istream.c	Wed Mar 05 02:03:10 2008 +0200
+++ b/src/lib/istream.c	Wed Mar 05 02:03:50 2008 +0200
@@ -49,6 +49,9 @@ void i_stream_close(struct istream *stre
 {
 	io_stream_close(&stream->real_stream->iostream);
 	stream->closed = TRUE;
+
+	if (stream->stream_errno == 0)
+		stream->stream_errno = ECONNRESET;
 }
 
 void i_stream_set_max_buffer_size(struct istream *stream, size_t max_size)


More information about the dovecot-cvs mailing list