From cfa769fb9fe91b071a4d9ac7dbffcc49f6c0d8fd Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Fri, 19 May 2006 11:03:29 +0100 Subject: [PATCH] rpcrt4: Warn if CreateNamedPipe fails. --- dlls/rpcrt4/rpc_transport.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index 447cbd8388..b4e71e70ac 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -89,6 +89,11 @@ static RPC_STATUS rpcrt4_connect_pipe(RpcConnection *Connection, LPCSTR pname) PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE, PIPE_UNLIMITED_INSTANCES, RPC_MAX_PACKET_SIZE, RPC_MAX_PACKET_SIZE, 5000, NULL); + if (npc->pipe == INVALID_HANDLE_VALUE) { + WARN("CreateNamedPipe failed with error %ld\n", GetLastError()); + return RPC_S_SERVER_UNAVAILABLE; + } + memset(&npc->ovl, 0, sizeof(npc->ovl)); npc->ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); if (ConnectNamedPipe(npc->pipe, &npc->ovl))