dovecot: Assert: With files o_stream_send*() must either write e...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Nov 24 06:51:31 EET 2007
details: http://hg.dovecot.org/dovecot/rev/b73cb35a8427
changeset: 6848:b73cb35a8427
user: Timo Sirainen <tss at iki.fi>
date: Sat Nov 24 06:40:09 2007 +0200
description:
Assert: With files o_stream_send*() must either write everything or return
an error.
diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
src/lib/ostream-file.c | 3 ++-
diffs (13 lines):
diff -r 04809db163ab -r b73cb35a8427 src/lib/ostream-file.c
--- a/src/lib/ostream-file.c Fri Nov 23 12:35:48 2007 +0200
+++ b/src/lib/ostream-file.c Sat Nov 24 06:40:09 2007 +0200
@@ -525,7 +525,8 @@ static ssize_t o_stream_file_sendv(struc
break;
}
stream->ostream.offset += ret;
- i_assert(ret <= (ssize_t)total_size);
+ i_assert((size_t)ret <= total_size);
+ i_assert((size_t)ret == total_size || !fstream->file);
return ret;
}
More information about the dovecot-cvs
mailing list