summaryrefslogtreecommitdiffstats
path: root/slirp/tcp_subr.c
diff options
context:
space:
mode:
authorAnthony Liguori <anthony@codemonkey.ws>2013-10-09 07:52:21 -0700
committerAnthony Liguori <anthony@codemonkey.ws>2013-10-09 07:52:21 -0700
commit9e8f8b1cd8e1b85dc93c367c4745f9944079a37b (patch)
treea4368aa23843f61829c01eb25a0deebee2262642 /slirp/tcp_subr.c
parentdfe22799751818115ed6d36bedc8a55b2026de3a (diff)
parent04fd1c789677fe121cb9546c652d088c994477fb (diff)
downloadhqemu-9e8f8b1cd8e1b85dc93c367c4745f9944079a37b.zip
hqemu-9e8f8b1cd8e1b85dc93c367c4745f9944079a37b.tar.gz
Merge remote-tracking branch 'sweil/mingw' into staging
# By Sebastian Ottlik # Via Stefan Weil * sweil/mingw: util: call socket_set_fast_reuse instead of setting SO_REUSEADDR slirp: call socket_set_fast_reuse instead of setting SO_REUSEADDR net: call socket_set_fast_reuse instead of setting SO_REUSEADDR gdbstub: call socket_set_fast_reuse instead of setting SO_REUSEADDR util: add socket_set_fast_reuse function which will replace setting SO_REUSEADDR Message-id: 1380735690-24009-1-git-send-email-sw@weilnetz.de Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
Diffstat (limited to 'slirp/tcp_subr.c')
-rw-r--r--slirp/tcp_subr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
index 043f28f..7571c5a 100644
--- a/slirp/tcp_subr.c
+++ b/slirp/tcp_subr.c
@@ -337,8 +337,7 @@ int tcp_fconnect(struct socket *so)
struct sockaddr_in addr;
qemu_set_nonblock(s);
- opt = 1;
- qemu_setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
+ socket_set_fast_reuse(s);
opt = 1;
qemu_setsockopt(s, SOL_SOCKET, SO_OOBINLINE, &opt, sizeof(opt));
@@ -426,8 +425,7 @@ void tcp_connect(struct socket *inso)
return;
}
qemu_set_nonblock(s);
- opt = 1;
- qemu_setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(int));
+ socket_set_fast_reuse(s);
opt = 1;
qemu_setsockopt(s, SOL_SOCKET, SO_OOBINLINE, &opt, sizeof(int));
socket_set_nodelay(s);
OpenPOWER on IntegriCloud