[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: RE: socket patch, for network events not being signaled.
From: "Stephane Lussier" <stephane () macadamian ! com>
Date: 2000-06-28 15:22:07
[Download RAW message or body]
Thanks for pointing me this stupid mistake. The correct patch is attached.
Is there anybody that can give more details on the possible problems of
doing set_event twice in the same handler mentionned by Ove's mail?
If it's a problem, I guess I can check if the event is signaled before
seting it, but I haven't see any code doing this kind of stuff in the
server.
Stef.
> -----Original Message-----
> From: Ove Kaaven [mailto:ovek@arcticnet.no]
> Sent: Wednesday, June 28, 2000 10:42 AM
> To: Stephane Lussier
> Cc: wine-patches
> Subject: Re: socket patch, for network events not being signaled.
>
>
>
> On Wed, 28 Jun 2000, Stephane Lussier wrote:
>
> > + if (sock->pmask && sock->mask)
> > + set_event(sock->event);
>
> Well, at least you could have used the binary operator (&) instead of the
> logical one (&&)...
>
> But note that I also seem to recall certain problems in the wineserver if
> set_event is called on some event objects (don't remember if it was manual
> reset or automatic reset) twice in the same handler, so perhaps you should
> verify that this won't happen.
>
>
["set_socket_event.diff" (application/octet-stream)]
Index: server/sock.c
===================================================================
RCS file: /home/wine/wine/server/sock.c,v
retrieving revision 1.9
diff -u -u -r1.9 sock.c
--- server/sock.c 2000/03/26 18:21:16 1.9
+++ server/sock.c 2000/06/27 18:20:09
@@ -461,6 +461,14 @@
sock_reselect( sock );
if (sock->mask)
sock->state |= WS_FD_NONBLOCKING;
+
+ /* if a network event is pending, signal the event object
+ it is possible that FD_CONNECT or FD_ACCEPT network events has happened
+ before a WSAEventSelect() was done on it.
+ (when dealing with Asynchronous socket) */
+ if (sock->pmask & sock->mask)
+ set_event(sock->event);
+
if (oevent)
{
if ((oevent != sock->event) && (omask & WS_FD_SERVEVENT))
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic