Zebediah Figura : server: Always clear pending messages in sock_wake_up().
Alexandre Julliard
julliard at winehq.org
Fri May 14 15:47:04 CDT 2021
Module: wine
Branch: master
Commit: 21efebbdc1350fdc987e8c7dcf35256907387d58
URL: https://source.winehq.org/git/wine.git/?a=commit;h=21efebbdc1350fdc987e8c7dcf35256907387d58
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Thu May 13 22:54:36 2021 -0500
server: Always clear pending messages in sock_wake_up().
Instead of clearing all messages when any match.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ws2_32/tests/sock.c | 2 +-
server/sock.c | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 9116c2b169d..33cdd5d6d15 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -4553,7 +4553,7 @@ static void test_close_events(struct event_test_ctx *ctx)
check_events(ctx, 0, 0, 200);
select_events(ctx, server, FD_ACCEPT | FD_CLOSE | FD_CONNECT | FD_OOB | FD_READ);
- check_events_todo(ctx, FD_CLOSE, 0, 200);
+ check_events_todo_event(ctx, FD_CLOSE, 0, 200);
closesocket(server);
}
diff --git a/server/sock.c b/server/sock.c
index 92202d317c4..340566cbb0a 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -400,12 +400,11 @@ static void sock_wake_up( struct sock *sock )
unsigned int events = sock->pending_events & sock->mask;
int i;
- if ( !events ) return;
-
if (sock->event)
{
if (debug_level) fprintf(stderr, "signalling events %x ptr %p\n", events, sock->event );
- set_event( sock->event );
+ if (events)
+ set_event( sock->event );
}
if (sock->window)
{
More information about the wine-cvs
mailing list