aboutsummaryrefslogtreecommitdiff
path: root/libxcb/src
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-11-05 17:00:20 +0000
committermarha <marha@users.sourceforge.net>2009-11-05 17:00:20 +0000
commitf5e3ac8167abd20db9f19c8f8794d9c68596e284 (patch)
tree4f23a6301a442b164d1dbcc3f0c4d017e40996f3 /libxcb/src
parent79dd5f1716cfc4664a6bc55f8c3d85dc3d7aa6f1 (diff)
downloadvcxsrv-f5e3ac8167abd20db9f19c8f8794d9c68596e284.tar.gz
vcxsrv-f5e3ac8167abd20db9f19c8f8794d9c68596e284.tar.bz2
vcxsrv-f5e3ac8167abd20db9f19c8f8794d9c68596e284.zip
Solved incorrect behaviour of writev in case the first send succeeded and the second returned with an error.
Diffstat (limited to 'libxcb/src')
-rw-r--r--libxcb/src/xcb_conn.c6
1 files 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;