diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2005-03-23 17:27:18 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2005-03-23 17:27:18 +0000 |
commit | a6099ff810747d2830edebc836202ff8dae1ead7 (patch) | |
tree | 3c79a17be098abb709311e8893488d2c3c116d33 /winsup/cygwin/select.cc | |
parent | bc3f9e29d0baa7d8ad07567a7780473c0fd3edcc (diff) | |
download | newlib-a6099ff810747d2830edebc836202ff8dae1ead7.zip newlib-a6099ff810747d2830edebc836202ff8dae1ead7.tar.gz newlib-a6099ff810747d2830edebc836202ff8dae1ead7.tar.bz2 |
* fhandler.h (fhandler_socket::eid_connect): Make private.
(fhandler_socket::set_connect_secret): Ditto.
(fhandler_socket::get_connect_secret): Ditto.
(fhandler_socket::create_secret_event): Ditto. Remove secret argument.
(fhandler_socket::check_peer_secret_event): Ditto.
(fhandler_socket::signal_secret_event): Make private.
(fhandler_socket::close_secret_event): Ditto.
(fhandler_socket::sec_event_accept): New private method.
(fhandler_socket::sec_event_connect): Ditto.
(fhandler_socket::af_local_connect): New public method.
* fhandler_socket.cc: Use 'struct sockaddr' and 'struct sockaddr_in'
rather than just 'sockaddr' and 'sockaddr_in' throughout.
(fhandler_socket::eid_connect): Drop AF_LOCAL/SOCK_STREAM test.
(fhandler_socket::create_secret_event): Remove secret argument.
Always use connect_secret instead.
(fhandler_socket::check_peer_secret_event): Ditto.
(fhandler_socket::sec_event_connect): New method, combining entire
secret event handshake on connect side.
(fhandler_socket::af_local_connect): New method, combining secret
event handshake and eid credential transaction on connect side, to
be called from select.
(fhandler_socket::sec_event_accept): New method, combining entire
secret event handshake on accept side.
(fhandler_socket::connect): Drop secret, use connect_secret instead.
Move entire secret event handshake to sec_event_connect.
(fhandler_socket::accept): Move entire secret event handshake to
sec_event_accept.
* select.cc (set_bits): Just call af_local_connect here.
Diffstat (limited to 'winsup/cygwin/select.cc')
-rw-r--r-- | winsup/cygwin/select.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 8b77d2a..a884ea1 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -338,11 +338,10 @@ set_bits (select_record *me, fd_set *readfds, fd_set *writefds, UNIX_FD_SET (me->fd, writefds); if (me->except_on_write && (sock = me->fh->is_socket ())) { - /* eid credential transaction on successful non-blocking connect. - Since the read bit indicates an error, don't start transaction - if it's set. */ - if (!me->read_ready && sock->connect_state () == connect_pending) - sock->eid_connect (); + /* Special AF_LOCAL handling. */ + if (!me->read_ready && sock->connect_state () == connect_pending + && sock->af_local_connect () && me->read_selected) + UNIX_FD_SET (me->fd, readfds); sock->connect_state (connected); } ready++; @@ -354,8 +353,10 @@ set_bits (select_record *me, fd_set *readfds, fd_set *writefds, UNIX_FD_SET (me->fd, writefds); if ((sock = me->fh->is_socket ())) { - if (!me->read_ready && sock->connect_state () == connect_pending) - sock->eid_connect (); + /* Special AF_LOCAL handling. */ + if (!me->read_ready && sock->connect_state () == connect_pending + && sock->af_local_connect () && me->read_selected) + UNIX_FD_SET (me->fd, readfds); sock->connect_state (connected); } } |