aboutsummaryrefslogtreecommitdiff
path: root/tcp_subr.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-07-12 22:33:07 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-07-12 22:33:07 +0000
commit57c3d6480861f11f1558708967fc58e3a80da2b4 (patch)
tree0814d528e6c2f2dae157a17ec825d52db6a4f992 /tcp_subr.c
parent25267a3cd019af1e37e200977d28f357c4a4ea14 (diff)
downloadslirp-57c3d6480861f11f1558708967fc58e3a80da2b4.zip
slirp-57c3d6480861f11f1558708967fc58e3a80da2b4.tar.gz
slirp-57c3d6480861f11f1558708967fc58e3a80da2b4.tar.bz2
win32 compile
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1016 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tcp_subr.c')
-rw-r--r--tcp_subr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tcp_subr.c b/tcp_subr.c
index 06940a4..c12c6bd 100644
--- a/tcp_subr.c
+++ b/tcp_subr.c
@@ -298,7 +298,7 @@ struct tcpcb *tcp_close(tp) register struct tcpcb *tp;
/* clobber input socket cache if we're closing the cached connection */
if (so == tcp_last_so)
tcp_last_so = &tcb;
- close(so->s);
+ closesocket(so->s);
sbfree(&so->so_rcv);
sbfree(&so->so_snd);
sofree(so);
@@ -466,7 +466,7 @@ void tcp_connect(inso) struct socket *inso;
} else {
if ((so = socreate()) == NULL) {
/* If it failed, get rid of the pending connection */
- close(accept(inso->s, (struct sockaddr *)&addr, &addrlen));
+ closesocket(accept(inso->s, (struct sockaddr *)&addr, &addrlen));
return;
}
if (tcp_attach(so) < 0) {
@@ -497,7 +497,8 @@ void tcp_connect(inso) struct socket *inso;
/* Close the accept() socket, set right state */
if (inso->so_state & SS_FACCEPTONCE) {
- close(so->s); /* If we only accept once, close the accept() socket */
+ closesocket(
+ so->s); /* If we only accept once, close the accept() socket */
so->so_state =
SS_NOFDREF; /* Don't select it yet, even though we have an FD */
/* if it's not FACCEPTONCE, it's already NOFDREF */