diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c index 4a87bd07dc9..6e9dbe96972 100644 --- a/dlls/rpcrt4/rpc_server.c +++ b/dlls/rpcrt4/rpc_server.c @@ -772,9 +772,6 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpExA( RPC_CSTR Protseq, UINT MaxCalls, RPC debugstr_a(szep), SecurityDescriptor, lpPolicy->Length, lpPolicy->EndpointFlags, lpPolicy->NICFlags ); - if (!Endpoint) - return RPC_S_INVALID_ENDPOINT_FORMAT; - status = RPCRT4_get_or_create_serverprotseq(MaxCalls, RPCRT4_strdupA(szps), &ps); if (status != RPC_S_OK) return status; @@ -796,9 +793,6 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpExW( RPC_WSTR Protseq, UINT MaxCalls, RPC debugstr_w( Endpoint ), SecurityDescriptor, lpPolicy->Length, lpPolicy->EndpointFlags, lpPolicy->NICFlags ); - if (!Endpoint) - return RPC_S_INVALID_ENDPOINT_FORMAT; - status = RPCRT4_get_or_create_serverprotseq(MaxCalls, RPCRT4_strdupWtoA(Protseq), &ps); if (status != RPC_S_OK) return status; diff --git a/dlls/rpcrt4/tests/rpc_protseq.c b/dlls/rpcrt4/tests/rpc_protseq.c index 06a82ecaa41..4837f6afdef 100644 --- a/dlls/rpcrt4/tests/rpc_protseq.c +++ b/dlls/rpcrt4/tests/rpc_protseq.c @@ -43,13 +43,6 @@ static void test_RpcServerUseProtseq(void) static unsigned char np[] = "ncacn_np"; static unsigned char ncalrpc[] = "ncalrpc"; - /* show that RpcServerUseProtseqEp(..., NULL, ...) isn't the same as - * RpcServerUseProtseq(...) */ - status = RpcServerUseProtseqEp(ncalrpc, 0, NULL, NULL); - ok(status == RPC_S_INVALID_ENDPOINT_FORMAT, - "RpcServerUseProtseqEp with NULL endpoint should have failed with " - "RPC_S_INVALID_ENDPOINT_FORMAT instead of %d\n", status); - status = RpcServerInqBindings(&bindings); if (status == RPC_S_NO_BINDINGS) binding_count_before = 0; @@ -60,6 +53,13 @@ static void test_RpcServerUseProtseq(void) RpcBindingVectorFree(&bindings); } + /* show that RpcServerUseProtseqEp(..., NULL, ...) is the same as + * RpcServerUseProtseq(...) */ + status = RpcServerUseProtseqEp(ncalrpc, 0, NULL, NULL); + ok(status == RPC_S_OK || broken(status == RPC_S_INVALID_ENDPOINT_FORMAT), + "RpcServerUseProtseqEp with NULL endpoint failed with status %d\n", + status); + /* register protocol sequences without explicit endpoints */ status = RpcServerUseProtseq(np, 0, NULL); if (status == RPC_S_PROTSEQ_NOT_SUPPORTED)