This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Re: [corinna-cygwin@cygwin.com: Re: ENOTSOCK errors with cygwin dll 1.3.21 and 1.3.22]


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]