[RPCRT4] Handle ERROR_BAD_NETPATH failure if an RPC pipe connection is done on an non-existing UNC path.

Addendum to 5274857d (see originally commit 13f41d74). CORE-6561
This commit is contained in:
Hermès Bélusca-Maïto 2020-04-02 19:55:35 +02:00
parent 568b6d0558
commit 76ebd0d054
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 15 additions and 0 deletions

View file

@ -174,6 +174,11 @@ static RPC_STATUS rpcrt4_conn_open_pipe(RpcConnection *Connection, LPCSTR pname,
}
TRACE("connection failed, error=%x\n", err);
return RPC_S_SERVER_TOO_BUSY;
#ifdef __REACTOS__
} else if (err == ERROR_BAD_NETPATH) {
TRACE("connection failed, error=%x\n", err);
return RPC_S_SERVER_UNAVAILABLE;
#endif
}
if (!wait || !WaitNamedPipeA(pname, NMPWAIT_WAIT_FOREVER)) {
err = GetLastError();

View file

@ -118,6 +118,16 @@ diff -pudN e:\wine\dlls\rpcrt4/rpc_transport.c e:\reactos\dll\win32\rpcrt4/rpc_t
static RpcConnection *rpcrt4_spawn_connection(RpcConnection *old_connection);
/**** ncacn_np support ****/
@@ -174,6 +174,9 @@ static RPC_STATUS rpcrt4_conn_open_pipe(RpcConnection *Connection, LPCSTR pname,
}
TRACE("connection failed, error=%x\n", err);
return RPC_S_SERVER_TOO_BUSY;
+ } else if (err == ERROR_BAD_NETPATH) {
+ TRACE("connection failed, error=%x\n", err);
+ return RPC_S_SERVER_UNAVAILABLE;
}
if (!wait || !WaitNamedPipeA(pname, NMPWAIT_WAIT_FOREVER)) {
err = GetLastError();
@@ -237,14 +258,24 @@ static RPC_STATUS rpcrt4_protseq_ncalrpc
return r;
}