[2/2] server: Deliver an async io APC to any alive thread in the process.
Dmitry Timoshkov <[email protected]> Tue, 7 Nov 2017 11:11:10 +0800
| Newsgroups | gmane.comp.emulators.wine.patches |
|---|---|
| Message-ID | <[email protected]> |
Signed-off-by: Dmitry Timoshkov <[email protected]> --- dlls/ws2_32/tests/sock.c | 6 +----- server/async.c | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 179ace4c6a..60fb1bccce 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -11289,15 +11289,13 @@ static void iocp_async_read_thread_closesocket(SOCKET src) ok(!ret, "got %d\n", ret); todo_wine ok(GetLastError() == ERROR_CONNECTION_ABORTED || GetLastError() == ERROR_NETNAME_DELETED /* XP */, "got %u\n", GetLastError()); -todo_wine ok(!bytes, "got bytes %u\n", bytes); -todo_wine ok(key == 0x12345678, "got key %#lx\n", key); -todo_wine ok(ovl_iocp == &recv_info.ovl, "got ovl %p\n", ovl_iocp); if (ovl_iocp) { ok(!ovl_iocp->InternalHigh, "got %#lx\n", ovl_iocp->InternalHigh); +todo_wine ok(ovl_iocp->Internal == (ULONG)STATUS_CONNECTION_ABORTED || ovl_iocp->Internal == (ULONG)STATUS_LOCAL_DISCONNECT /* XP */, "got %#lx\n", ovl_iocp->Internal); } @@ -11414,7 +11412,6 @@ static void iocp_async_read_thread(SOCKET src, SOCKET dst) Sleep(100); memset(&msg, 0, sizeof(msg)); ret = PeekMessageA(&msg, hwnd, WM_SOCKET, WM_SOCKET, PM_REMOVE); -todo_wine ok(!ret || broken(msg.hwnd == hwnd) /* XP */, "got %04x,%08lx,%08lx\n", msg.message, msg.wParam, msg.lParam); if (ret) /* document XP behaviour */ { @@ -11429,7 +11426,6 @@ todo_wine ovl_iocp = (void *)0xdeadbeef; SetLastError(0xdeadbeef); ret = GetQueuedCompletionStatus(port, &bytes, &key, &ovl_iocp, 100); -todo_wine ok(ret || broken(GetLastError() == WAIT_TIMEOUT) /* XP */, "got %u\n", GetLastError()); if (ret) { diff --git a/server/async.c b/server/async.c index 4e89e1ef4a..4f1bcf15f4 100644 --- a/server/async.c +++ b/server/async.c @@ -167,7 +167,7 @@ void async_terminate( struct async *async, unsigned int status ) data.async_io.user = async->data.user; data.async_io.sb = async->data.iosb; data.async_io.status = status; - thread_queue_apc( NULL, async->thread, &async->obj, &data ); + thread_queue_apc( async->thread->process, async->thread, &async->obj, &data ); } else async_set_result( &async->obj, STATUS_SUCCESS, 0 ); } -- 2.15.0