Module: wine Branch: master Commit: e1561038d00da5421138a4bb48eefca1ced039f5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e1561038d00da5421138a4bb48...
Author: Rob Shearman rob@codeweavers.com Date: Fri Nov 10 12:07:28 2006 +0000
rpcrt4: Don't store the endpoint in the protseq.
---
dlls/rpcrt4/rpc_server.c | 21 +++++++++++---------- dlls/rpcrt4/rpc_server.h | 3 +-- 2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c index 3efcc12..fbd7233 100644 --- a/dlls/rpcrt4/rpc_server.c +++ b/dlls/rpcrt4/rpc_server.c @@ -492,11 +492,11 @@ static void RPCRT4_stop_listen(BOOL auto LeaveCriticalSection(&listen_cs); }
-static RPC_STATUS RPCRT4_use_protseq(RpcServerProtseq* ps) +static RPC_STATUS RPCRT4_use_protseq(RpcServerProtseq* ps, LPSTR endpoint) { RPC_STATUS status;
- status = ps->ops->open_endpoint(ps, ps->Endpoint); + status = ps->ops->open_endpoint(ps, endpoint); if (status != RPC_S_OK) return status;
@@ -605,7 +605,7 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpW /*********************************************************************** * alloc_serverprotoseq (internal) */ -static RPC_STATUS alloc_serverprotoseq(UINT MaxCalls, char *Protseq, char *Endpoint, RpcServerProtseq **ps) +static RPC_STATUS alloc_serverprotoseq(UINT MaxCalls, char *Protseq, RpcServerProtseq **ps) { const struct protseq_ops *ops = rpcrt4_get_protseq_ops(Protseq);
@@ -620,7 +620,6 @@ static RPC_STATUS alloc_serverprotoseq(U return RPC_S_OUT_OF_RESOURCES; (*ps)->MaxCalls = MaxCalls; (*ps)->Protseq = Protseq; - (*ps)->Endpoint = Endpoint; (*ps)->ops = ops; (*ps)->MaxCalls = 0; (*ps)->conn = NULL; @@ -646,12 +645,11 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpE debugstr_a(szep), SecurityDescriptor, lpPolicy->Length, lpPolicy->EndpointFlags, lpPolicy->NICFlags );
- status = alloc_serverprotoseq(MaxCalls, RPCRT4_strdupA(szps), - RPCRT4_strdupA(szep), &ps); + status = alloc_serverprotoseq(MaxCalls, RPCRT4_strdupA(szps), &ps); if (status != RPC_S_OK) return status;
- return RPCRT4_use_protseq(ps); + return RPCRT4_use_protseq(ps, szep); }
/*********************************************************************** @@ -662,17 +660,20 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpE { RpcServerProtseq* ps; RPC_STATUS status; + LPSTR EndpointA;
TRACE("(%s,%u,%s,%p,{%u,%lu,%lu})\n", debugstr_w( Protseq ), MaxCalls, debugstr_w( Endpoint ), SecurityDescriptor, lpPolicy->Length, lpPolicy->EndpointFlags, lpPolicy->NICFlags );
- status = alloc_serverprotoseq(MaxCalls, RPCRT4_strdupWtoA(Protseq), - RPCRT4_strdupWtoA(Endpoint), &ps); + status = alloc_serverprotoseq(MaxCalls, RPCRT4_strdupWtoA(Protseq), &ps); if (status != RPC_S_OK) return status;
- return RPCRT4_use_protseq(ps); + EndpointA = RPCRT4_strdupWtoA(Endpoint); + status = RPCRT4_use_protseq(ps, EndpointA); + RPCRT4_strfree(EndpointA); + return status; }
/*********************************************************************** diff --git a/dlls/rpcrt4/rpc_server.h b/dlls/rpcrt4/rpc_server.h index c385bed..aa873a0 100644 --- a/dlls/rpcrt4/rpc_server.h +++ b/dlls/rpcrt4/rpc_server.h @@ -31,8 +31,7 @@ typedef struct _RpcServerProtseq const struct protseq_ops *ops; /* RO */ struct list entry; /* CS ::server_cs */ LPSTR Protseq; /* RO */ - LPSTR Endpoint; /* RO */ - UINT MaxCalls; + UINT MaxCalls; /* RO */ /* list of listening connections */ RpcConnection* conn; /* CS cs */ CRITICAL_SECTION cs;