rpcrt4: Move the connected check inside the named pipe code.
This commit is contained in:
parent
5c6f72873a
commit
e7e209da64
|
@ -116,6 +116,10 @@ static RPC_STATUS rpcrt4_ncalrpc_open(RpcConnection* Connection)
|
|||
RPC_STATUS r;
|
||||
LPSTR pname;
|
||||
|
||||
/* already connected? */
|
||||
if (Connection->conn)
|
||||
return RPC_S_OK;
|
||||
|
||||
/* protseq=ncalrpc: supposed to use NT LPC ports,
|
||||
* but we'll implement it with named pipes for now */
|
||||
pname = HeapAlloc(GetProcessHeap(), 0, strlen(prefix) + strlen(Connection->Endpoint) + 1);
|
||||
|
@ -136,6 +140,10 @@ static RPC_STATUS rpcrt4_ncacn_np_open(RpcConnection* Connection)
|
|||
RPC_STATUS r;
|
||||
LPSTR pname;
|
||||
|
||||
/* already connected? */
|
||||
if (Connection->conn)
|
||||
return RPC_S_OK;
|
||||
|
||||
/* protseq=ncacn_np: named pipes */
|
||||
pname = HeapAlloc(GetProcessHeap(), 0, strlen(prefix) + strlen(Connection->Endpoint) + 1);
|
||||
strcat(strcpy(pname, prefix), Connection->Endpoint);
|
||||
|
@ -218,10 +226,6 @@ RPC_STATUS RPCRT4_OpenConnection(RpcConnection* Connection)
|
|||
{
|
||||
TRACE("(Connection == ^%p)\n", Connection);
|
||||
|
||||
/* already connected? */
|
||||
if (Connection->conn)
|
||||
return RPC_S_OK;
|
||||
|
||||
return Connection->ops->open_connection(Connection);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue