This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: [PATCH] Re: [corinna-cygwin@cygwin.com: Re: ENOTSOCK errors with cygwin dll 1.3.21 and 1.3.22]
- From: Corinna Vinschen <cygwin-patches at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Tue, 27 May 2003 10:01:42 +0200
- Subject: Re: [PATCH] Re: [corinna-cygwin@cygwin.com: Re: ENOTSOCK errors with cygwin dll 1.3.21 and 1.3.22]
- References: <F0E13277A26BD311944600500454CCD05217D2@antarctica.intern.net> <Pine.WNT.4.44.0305261633550.288-200000@algeria.intern.net>
Hi Thomas,
On Tue, May 27, 2003 at 09:15:10AM +0200, Thomas Pfaff wrote:
> * fhandler_socket.cc (sock_event::~sock_event): New method.
> (sock_event::load): Change to void. Check if winsock2 is available.
> (socke_event::wait): Return 0 if interruptible mode is not available.
> (fhandler_socket::connect): Remove checks for winsock2 availability.
> (fhandler_socket::accept): Ditto.
that looks pretty good, just...
> --- fhandler_socket.cc.org 2003-05-26 16:08:16.000000000 +0200
> +++ fhandler_socket.cc 2003-05-27 09:05:38.000000000 +0200
> @@ -131,31 +131,44 @@ public:
> ev[0] = WSA_INVALID_EVENT;
> ev[1] = signal_arrived;
> }
> - bool load (SOCKET sock, int type_bit)
> + ~sock_event ()
> {
> - if ((ev[0] = WSACreateEvent ()) == WSA_INVALID_EVENT)
> - return false;
> + if (ev[0] != WSA_INVALID_EVENT)
> + CloseHandle (ev[0]);
^^^^^^^^^^^
...shouldn't that be a WSACloseEvent?
> + }
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin@cygwin.com
Red Hat, Inc.