dovecot: If o_stream_send_istream() fails, log an error.

dovecot at dovecot.org dovecot at dovecot.org
Sat Nov 3 17:15:00 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/03af6da2ace1
changeset: 6670:03af6da2ace1
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Nov 03 17:14:57 2007 +0200
description:
If o_stream_send_istream() fails, log an error.

diffstat:

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

diffs (13 lines):

diff -r dd9d618fefb9 -r 03af6da2ace1 src/lib/file-copy.c
--- a/src/lib/file-copy.c	Sat Nov 03 16:17:02 2007 +0200
+++ b/src/lib/file-copy.c	Sat Nov 03 17:14:57 2007 +0200
@@ -74,6 +74,9 @@ static int file_copy_to_tmp(const char *
 
 	while ((ret = o_stream_send_istream(output, input)) > 0) ;
 
+	if (ret < 0)
+		i_error("write(%s) failed: %m", tmppath);
+
 	i_stream_destroy(&input);
 	o_stream_destroy(&output);
 


More information about the dovecot-cvs mailing list