dovecot-2.2: i_stream_close(): Set stream_errno to EPIPE instead...

dovecot at dovecot.org dovecot at dovecot.org
Sat Dec 15 13:48:27 EET 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/984a5b4fa793
changeset: 15479:984a5b4fa793
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Dec 15 13:48:22 2012 +0200
description:
i_stream_close(): Set stream_errno to EPIPE instead of ENOENT.
ENOENT implies that this stream pointed to a file that never existed. EPIPE
isn't perfect either, but probably clearer than the alternatives.

diffstat:

 src/lib/istream.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r b277f0bb18a2 -r 984a5b4fa793 src/lib/istream.c
--- a/src/lib/istream.c	Sat Dec 15 13:43:44 2012 +0200
+++ b/src/lib/istream.c	Sat Dec 15 13:48:22 2012 +0200
@@ -75,7 +75,7 @@
 	stream->closed = TRUE;
 
 	if (stream->stream_errno == 0)
-		stream->stream_errno = ENOENT;
+		stream->stream_errno = EPIPE;
 }
 
 void i_stream_set_init_buffer_size(struct istream *stream, size_t size)


More information about the dovecot-cvs mailing list