Commit 9632048c authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

server: Set the event in IOCTL_AFD_EVENT_SELECT if the socket becomes signaled.

parent 131f9135
...@@ -5159,8 +5159,7 @@ static void test_accept_events(struct event_test_ctx *ctx) ...@@ -5159,8 +5159,7 @@ static void test_accept_events(struct event_test_ctx *ctx)
select_events(ctx, listener, FD_CONNECT | FD_READ | FD_OOB | FD_ACCEPT); select_events(ctx, listener, FD_CONNECT | FD_READ | FD_OOB | FD_ACCEPT);
ret = WaitForSingleObject(ctx->event, 0); ret = WaitForSingleObject(ctx->event, 0);
todo_wine ok(!ret, "wait timed out\n"); ok(!ret, "wait timed out\n");
if (!ret)
check_events(ctx, FD_ACCEPT, 0, 0); check_events(ctx, FD_ACCEPT, 0, 0);
server = accept(listener, NULL, NULL); server = accept(listener, NULL, NULL);
......
...@@ -2543,6 +2543,11 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) ...@@ -2543,6 +2543,11 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
sock->nonblocking = 1; sock->nonblocking = 1;
sock_reselect( sock ); sock_reselect( sock );
/* Explicitly wake the socket up if the mask causes it to become
* signaled. Note that reselecting isn't enough, since we might already
* have had events recorded in sock->reported_events and we don't want
* to select for them again. */
sock_wake_up( sock );
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment