Module: wine Branch: master Commit: 4d8057ffef2349fd1dc79a3105b9a0165527736e URL: http://source.winehq.org/git/wine.git/?a=commit;h=4d8057ffef2349fd1dc79a3105...
Author: Rob Shearman robertshearman@gmail.com Date: Sun Mar 29 18:42:20 2009 +0100
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.
---
dlls/rpcrt4/rpc_server.c | 6 ------ dlls/rpcrt4/tests/rpc_protseq.c | 14 +++++++------- 2 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c index 4a87bd0..6e9dbe9 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 06a82ec..4837f6a 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)