From f5e3ac8167abd20db9f19c8f8794d9c68596e284 Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 5 Nov 2009 17:00:20 +0000 Subject: Solved incorrect behaviour of writev in case the first send succeeded and the second returned with an error. --- libxcb/src/xcb_conn.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libxcb/src/xcb_conn.c b/libxcb/src/xcb_conn.c index 4a8f63bcf..0b080d4d4 100644 --- a/libxcb/src/xcb_conn.c +++ b/libxcb/src/xcb_conn.c @@ -78,8 +78,10 @@ size_t writev(int fildes, const struct iovec *iov, int iovcnt) errno =WSAGetLastError(); if(errno == WSAEWOULDBLOCK) errno = EAGAIN; - assert(sum == 0); - return r; + if (sum) + return sum; + else + return r; } p += r; l -= r; -- cgit v1.2.3