aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-11-24 20:39:26 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-11-24 20:39:26 +0000
commit3bc2175dcc62d699c4b0a0b9c6bb2ae37bcb66b7 (patch)
treee346495c05f7233c146fbfed0aeeb6c0d39ba759
parentbed5cd8048abbb8e02618082e7f285ff95fc5989 (diff)
downloadqemu-3bc2175dcc62d699c4b0a0b9c6bb2ae37bcb66b7.zip
qemu-3bc2175dcc62d699c4b0a0b9c6bb2ae37bcb66b7.tar.gz
qemu-3bc2175dcc62d699c4b0a0b9c6bb2ae37bcb66b7.tar.bz2
socket send fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1158 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--slirp/socket.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/slirp/socket.c b/slirp/socket.c
index 6713c4d..47ed44b 100644
--- a/slirp/socket.c
+++ b/slirp/socket.c
@@ -352,8 +352,12 @@ sowrite(so)
}
#ifndef HAVE_READV
- if (n == 2 && nn == iov[0].iov_len)
- nn += send(so->s, iov[1].iov_base, iov[1].iov_len,0);
+ if (n == 2 && nn == iov[0].iov_len) {
+ int ret;
+ ret = send(so->s, iov[1].iov_base, iov[1].iov_len,0);
+ if (ret > 0)
+ nn += ret;
+ }
DEBUG_MISC((dfd, " ... wrote nn = %d bytes\n", nn));
#endif