Mike Kaplinskiy : server: Fix some comments.

Alexandre Julliard julliard at winehq.org
Wed Jul 28 10:45:12 CDT 2010


Module: wine
Branch: master
Commit: a6203f8b5325ea32a92d3f30dfa89a8dfae6c198
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a6203f8b5325ea32a92d3f30dfa89a8dfae6c198

Author: Mike Kaplinskiy <mike.kaplinskiy at gmail.com>
Date:   Tue Jul 27 00:16:28 2010 -0400

server: Fix some comments.

Apparently windows reports only currently valid events for WSAEnumNetworkEvents.

---

 dlls/ws2_32/tests/sock.c |    3 ---
 server/sock.c            |    4 +++-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index b078b9f..5a8e0df 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -3126,9 +3126,6 @@ static void test_events(int useMessages)
     ok(ret == 2, "Failed to send buffer %d err %d\n", ret, GetLastError());
     broken_seq[0] = read_read_seq; /* win9x */
     broken_seq[1] = NULL;
-    /* we like to erase pmask in server, so we have varying behavior here *
-     * it is only fixed for now because we refuse to send notifications with
-     * any kind of asyncs requests running */
     ok_event_seq(src, hEvent, empty_seq, broken_seq, 0);
 
     dwRet = WaitForSingleObject(ov.hEvent, 100);
diff --git a/server/sock.c b/server/sock.c
index 44422ad..4922d64 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -961,7 +961,9 @@ DECL_HANDLER(enable_socket_event)
                                                FILE_WRITE_ATTRIBUTES, &sock_ops)))
         return;
 
-    sock->pmask &= ~req->mask; /* is this safe? */
+    /* for event-based notification, windows erases stale events */
+    sock->pmask &= ~req->mask;
+
     sock->hmask &= ~req->mask;
     sock->state |= req->sstate;
     sock->state &= ~req->cstate;




More information about the wine-cvs mailing list