socket send fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1158 c046a42c-6fe2-441c-8c8c-71466251a162
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 @@
}
#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