[Bug 10204] Can't create games on D2GS; incorrectly raised FD_WRITE socket event

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Sep 12 00:48:57 CDT 2010


http://bugs.winehq.org/show_bug.cgi?id=10204

Mike Kaplinskiy <mike.kaplinskiy at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mike.kaplinskiy at gmail.com

--- Comment #31 from Mike Kaplinskiy <mike.kaplinskiy at gmail.com> 2010-09-12 00:48:55 CDT ---
The only reason that FD_WRITE is raised again is because WSAEventSelect is
called again. If you don't call it again (as you shouldn't really ever need
to), all will be well.

If the windows behavior is not to refire events when the mask changes, then we
need to add a test for that. We'd need to add tests for both WSAEventSelect and
WSAAsyncSelect, as well as switching between them. We may also want to test
what happens if we add/remove events when re-selecting.

As for that hack, it's not just ugly, it's completely incorrect (instead of
saying "don't fire FD_WRITE again" it's more like "mark this socket as not
writable ever again". This will cause some awesome overlapped failures.) For a
hack, something like this should do a little better (in terms of killing other
applications):

diff --git a/server/sock.c b/server/sock.c
index 04ae748..a1afeb3 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -972,7 +972,6 @@ DECL_HANDLER(set_socket_event)
                                                 FILE_WRITE_ATTRIBUTES,
&sock_ops)
     old_event = sock->event;
     sock->mask    = req->mask;
-    sock->hmask   &= ~req->mask; /* re-enable held events */
     sock->event   = NULL;
     sock->window  = req->window;
     sock->message = req->msg;

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list