changeset 15479:984a5b4fa793

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.
author Timo Sirainen <tss@iki.fi>
date Sat, 15 Dec 2012 13:48:22 +0200
parents b277f0bb18a2
children 79bcf862bf1c
files src/lib/istream.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)