Ove, By looking a second time at the code, you're right all the way. In my case the event should be signaled (because there's a network event pending) , and it's not, I will track down th real problem and send another patch. Thanks, Stephane. > -----Original Message----- > From: Ove Kaaven [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 21, 2000 5:29 PM > To: [EMAIL PROTECTED] > Subject: Re: WSAEventSelect (WinSock) patch. (fwd) > > > > On Wed, 21 Jun 2000, Stephane Lussier wrote: > > > ChangeLog: > > In WSAEventSelect() function of WinSock, the event should be > signaled right > > away if there's some network events pending corresponding to the event > > selected in this function. That's how WSAEventSelect behaves > under Windows. > > This patch seems incorrect to me. For one, the _get_sock_mask() function > retrieves the current event mask, not the pending events (the pending > events are in the "pmask" field of the server request, if you look at > WSAEnumNetworkEvents), so this patch would simply *always* signal the > event. Second, the server request set_socket_event (handled in > server/sock.c) *already* checks the new event mask and acts on it (i.e. > signals the event) immediately while handling set_socket_event, so it's > not necessary for the client side to do so (it is a race condition to let > the client side do so anyway). At least that's the theory; there could be > some bugs lurking around... > > >