diff options
author | marha <marha@users.sourceforge.net> | 2009-11-05 17:00:20 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-11-05 17:00:20 +0000 |
commit | f5e3ac8167abd20db9f19c8f8794d9c68596e284 (patch) | |
tree | 4f23a6301a442b164d1dbcc3f0c4d017e40996f3 /libxcb/src/xcb_conn.c | |
parent | 79dd5f1716cfc4664a6bc55f8c3d85dc3d7aa6f1 (diff) | |
download | vcxsrv-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/xcb_conn.c')
-rw-r--r-- | libxcb/src/xcb_conn.c | 6 |
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; |