rpcrt4: RpcServerUseProtseqEp(..., NULL, ...) should return RPC_S_OK.

However, on some buggy platforms it returns
RPC_S_INVALID_ENDPOINT_FORMAT. Don't follow this behaviour our
implementation of the API.
This commit is contained in:
Rob Shearman 2009-03-29 18:42:20 +01:00 committed by Alexandre Julliard
parent c82efc02ee
commit 4d8057ffef
2 changed files with 7 additions and 13 deletions

View File

@ -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;

View File

@ -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)