[dovecot-cvs] dovecot/src/lib ostream.c,1.18,1.19

tss at dovecot.org tss at dovecot.org
Thu Feb 22 14:10:07 UTC 2007


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv14467

Modified Files:
	ostream.c 
Log Message:
If o_stream_send_istream() fails, make sure errno is set to
outstream.stream_errno.



Index: ostream.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ostream.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- ostream.c	15 Dec 2006 16:55:33 -0000	1.18
+++ ostream.c	22 Feb 2007 14:10:05 -0000	1.19
@@ -146,11 +146,15 @@
 			    struct istream *instream)
 {
 	struct _ostream *_outstream = outstream->real_stream;
+	off_t ret;
 
 	if (outstream->closed || instream->closed)
 		return -1;
 
-	return _outstream->send_istream(_outstream, instream);
+	ret = _outstream->send_istream(_outstream, instream);
+	if (ret < 0)
+		errno = outstream->stream_errno;
+	return ret;
 }
 
 struct ostream *_o_stream_create(struct _ostream *_stream, pool_t pool)



More information about the dovecot-cvs mailing list