[PATCH] rpcrt4: Implement wait_for_incoming_data() for named pipes transport.

Dmitry Timoshkov dmitry at baikal.ru
Fri Sep 13 03:06:45 CDT 2019


Signed-off-by: Dmitry Timoshkov <dmitry at 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




More information about the wine-devel mailing list