diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-11-24 20:39:26 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-11-24 20:39:26 +0000 |
commit | 3bc2175dcc62d699c4b0a0b9c6bb2ae37bcb66b7 (patch) | |
tree | e346495c05f7233c146fbfed0aeeb6c0d39ba759 /slirp/socket.c | |
parent | bed5cd8048abbb8e02618082e7f285ff95fc5989 (diff) |
socket send fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1158 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'slirp/socket.c')
-rw-r--r-- | slirp/socket.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/slirp/socket.c b/slirp/socket.c index 6713c4d5e7..47ed44b937 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 |