diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-07-12 22:33:07 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-07-12 22:33:07 +0000 |
commit | 57c3d6480861f11f1558708967fc58e3a80da2b4 (patch) | |
tree | 0814d528e6c2f2dae157a17ec825d52db6a4f992 /tcp_subr.c | |
parent | 25267a3cd019af1e37e200977d28f357c4a4ea14 (diff) | |
download | slirp-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.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 */ |