dovecot: o_stream_sendv(): If we're trying to send 0 bytes, just...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Nov 24 15:21:41 EET 2007
details: http://hg.dovecot.org/dovecot/rev/7717e03db8b3
changeset: 6853:7717e03db8b3
user: Timo Sirainen <tss at iki.fi>
date: Sat Nov 24 15:21:38 2007 +0200
description:
o_stream_sendv(): If we're trying to send 0 bytes, just return 0
immediately.
diffstat:
1 file changed, 2 insertions(+)
src/lib/ostream.c | 2 ++
diffs (12 lines):
diff -r 6ed01546f211 -r 7717e03db8b3 src/lib/ostream.c
--- a/src/lib/ostream.c Sat Nov 24 13:54:46 2007 +0200
+++ b/src/lib/ostream.c Sat Nov 24 15:21:38 2007 +0200
@@ -143,6 +143,8 @@ ssize_t o_stream_sendv(struct ostream *s
stream->stream_errno = 0;
for (i = 0, total_size = 0; i < iov_count; i++)
total_size += iov[i].iov_len;
+ if (total_size == 0)
+ return 0;
ret = _stream->sendv(_stream, iov, iov_count);
if (unlikely(ret != (ssize_t)total_size)) {
More information about the dovecot-cvs
mailing list