dovecot-2.2: o_stream_send_istream(): Fixed copying when [io]str...
    dovecot at dovecot.org 
    dovecot at dovecot.org
       
    Sun Feb 24 15:02:57 EET 2013
    
    
  
details:   http://hg.dovecot.org/dovecot-2.2/rev/2747055fc91b
changeset: 15913:2747055fc91b
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Feb 24 15:02:44 2013 +0200
description:
o_stream_send_istream(): Fixed copying when [io]streams neither have usable fds.
diffstat:
 src/lib/ostream-file.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r 94ebc333c47a -r 2747055fc91b src/lib/ostream-file.c
--- a/src/lib/ostream-file.c	Sun Feb 24 15:00:13 2013 +0200
+++ b/src/lib/ostream-file.c	Sun Feb 24 15:02:44 2013 +0200
@@ -873,7 +873,8 @@
 		foutstream->no_sendfile = TRUE;
 	}
 
-	same_stream = i_stream_get_fd(instream) == foutstream->fd;
+	same_stream = i_stream_get_fd(instream) == foutstream->fd &&
+		foutstream->fd != -1;
 	return io_stream_copy_stream(outstream, instream, same_stream);
 }
 
    
    
More information about the dovecot-cvs
mailing list