* fhandler_socket.cc (fhandler_socket::accept): On successful execution
set connection state of returned socket to CONNECTED.
This commit is contained in:
parent
6816724d0d
commit
01e3c89709
|
@ -1,3 +1,8 @@
|
|||
2003-01-28 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler_socket.cc (fhandler_socket::accept): On successful execution
|
||||
set connection state of returned socket to CONNECTED.
|
||||
|
||||
2003-01-27 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
* passwd.cc (pwdgrp::parse_passwd): Be more unforgiving about
|
||||
|
|
|
@ -484,6 +484,7 @@ fhandler_socket::accept (struct sockaddr *peer, int *len)
|
|||
WSAEVENT ev[2] = { WSA_INVALID_EVENT, signal_arrived };
|
||||
BOOL secret_check_failed = FALSE;
|
||||
BOOL in_progress = FALSE;
|
||||
cygheap_fdnew res_fd;
|
||||
|
||||
/* Allows NULL peer and len parameters. */
|
||||
struct sockaddr_in peer_dummy;
|
||||
|
@ -592,22 +593,20 @@ fhandler_socket::accept (struct sockaddr *peer, int *len)
|
|||
}
|
||||
}
|
||||
|
||||
{
|
||||
cygheap_fdnew res_fd;
|
||||
if (res_fd < 0)
|
||||
/* FIXME: what is correct errno? */;
|
||||
else if ((SOCKET) res == (SOCKET) INVALID_SOCKET)
|
||||
set_winsock_errno ();
|
||||
else
|
||||
{
|
||||
fhandler_socket* res_fh = fdsock (res_fd, get_name (), res);
|
||||
if (get_addr_family () == AF_LOCAL)
|
||||
res_fh->set_sun_path (get_sun_path ());
|
||||
res_fh->set_addr_family (get_addr_family ());
|
||||
res_fh->set_socket_type (get_socket_type ());
|
||||
res = res_fd;
|
||||
}
|
||||
}
|
||||
if (res_fd < 0)
|
||||
/* FIXME: what is correct errno? */;
|
||||
else if ((SOCKET) res == (SOCKET) INVALID_SOCKET)
|
||||
set_winsock_errno ();
|
||||
else
|
||||
{
|
||||
fhandler_socket* res_fh = fdsock (res_fd, get_name (), res);
|
||||
if (get_addr_family () == AF_LOCAL)
|
||||
res_fh->set_sun_path (get_sun_path ());
|
||||
res_fh->set_addr_family (get_addr_family ());
|
||||
res_fh->set_socket_type (get_socket_type ());
|
||||
res_fh->set_connect_state (CONNECTED);
|
||||
res = res_fd;
|
||||
}
|
||||
|
||||
done:
|
||||
if (ev[0] != WSA_INVALID_EVENT)
|
||||
|
|
Loading…
Reference in New Issue