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

Thomas Pfaff tpfaff@gmx.net
Tue May 27 07:15:00 GMT 2003



On Mon, 26 May 2003, Corinna Vinschen wrote:

> Ouch!  That's the implementation of sock_event::load().  It uses a bunch
> of functions which are only available in WinSock2.
>
> I've checked in a patch to fhandler_socket::connect() and
> fhandler_socket::accept()).  Could you test it please?  Basically it's
> just checking for WinSock2 availability before calling sock_event::load()
> and sock_event::wait().
>

Corinna,

may i suggest the attached patch to solve this issue. Instead of checking
winsock2_active at 3 different locations i would move this into
sock_event::load. If winsock2 is not active or something with the event
select will fail continue in non interruptible mode.

Thomas

2003-05-27  Thomas Pfaff  <tpfaff@gmx.net>

	* 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.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fhandler_socket.patch
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20030527/950fba0a/attachment.ksh>


More information about the Cygwin-patches mailing list