[PATCH] rpcrt4: Implement wait_for_incoming_data() for named pipes transport.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- dlls/rpcrt4/rpc_transport.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index 02fd56ce96..7564b66df1 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -463,10 +463,17 @@ static void rpcrt4_conn_np_cancel_call(RpcConnection *conn) CancelIoEx(connection->pipe, NULL); } -static int rpcrt4_conn_np_wait_for_incoming_data(RpcConnection *Connection) +static int rpcrt4_conn_np_wait_for_incoming_data(RpcConnection *conn) { - /* FIXME: implement when named pipe writes use overlapped I/O */ - return -1; + RpcConnection_np *connection = (RpcConnection_np *)conn; + HANDLE event; + + event = get_np_event(connection); + if (!event) return -1; + + WaitForSingleObject(event, INFINITE); + release_np_event(connection, event); + return 0; } static size_t rpcrt4_ncacn_np_get_top_of_tower(unsigned char *tower_data, -- 2.20.1
Hi, While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=56499 Your paranoid android. === debian10 (32 bit WoW report) === rpcrt4: cstub.c:1386: Test failed: wait failed cstub.c:1400: Test failed: got 0x80040154 Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00404b9a). cstub.c:1359: Test failed: got 0x80010115 Report errors: rpcrt4:cstub crashed (c0000005) rpcrt4:rpc contains a misplaced failure message for cstub
Marvin <testbot(a)winehq.org> wrote:
=== debian10 (32 bit WoW report) ===
rpcrt4: cstub.c:1386: Test failed: wait failed cstub.c:1400: Test failed: got 0x80040154 Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00404b9a). cstub.c:1359: Test failed: got 0x80010115
Report errors: rpcrt4:cstub crashed (c0000005) rpcrt4:rpc contains a misplaced failure message for cstub
These failures don't seem to be related, the tests pass without failures for me. -- Dmitry.
Dmitry Timoshkov <dmitry(a)baikal.ru> writes:
+static int rpcrt4_conn_np_wait_for_incoming_data(RpcConnection *conn) { - /* FIXME: implement when named pipe writes use overlapped I/O */ - return -1; + RpcConnection_np *connection = (RpcConnection_np *)conn; + HANDLE event; + + event = get_np_event(connection); + if (!event) return -1; + + WaitForSingleObject(event, INFINITE); + release_np_event(connection, event);
How is that event going to be set? -- Alexandre Julliard julliard(a)winehq.org
Alexandre Julliard <julliard(a)winehq.org> wrote:
+static int rpcrt4_conn_np_wait_for_incoming_data(RpcConnection *conn) { - /* FIXME: implement when named pipe writes use overlapped I/O */ - return -1; + RpcConnection_np *connection = (RpcConnection_np *)conn; + HANDLE event; + + event = get_np_event(connection); + if (!event) return -1; + + WaitForSingleObject(event, INFINITE); + release_np_event(connection, event);
How is that event going to be set?
Thanks for tha review. I blindly copied the code from the read() backend. Hopefully new version is better. -- Dmitry.
participants (3)
-
Alexandre Julliard -
Dmitry Timoshkov -
Marvin