mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 15:20:47 +00:00
rpcrt4: Only initialise the context handle to NULL in NdrContextHandleUnmarshall if it is an out-only or return one.
Fix the indentation and add tracing of the context handle flags.
This commit is contained in:
parent
6ec9e0c77a
commit
a4b18699ac
|
@ -6207,6 +6207,7 @@ static unsigned char *WINAPI NdrContextHandleMarshall(
|
||||||
ERR("invalid format type %x\n", *pFormat);
|
ERR("invalid format type %x\n", *pFormat);
|
||||||
RpcRaiseException(RPC_S_INTERNAL_ERROR);
|
RpcRaiseException(RPC_S_INTERNAL_ERROR);
|
||||||
}
|
}
|
||||||
|
TRACE("flags: 0x%02x\n", pFormat[1]);
|
||||||
|
|
||||||
if (pFormat[1] & 0x80)
|
if (pFormat[1] & 0x80)
|
||||||
NdrClientContextMarshall(pStubMsg, *(NDR_CCONTEXT **)pMemory, FALSE);
|
NdrClientContextMarshall(pStubMsg, *(NDR_CCONTEXT **)pMemory, FALSE);
|
||||||
|
@ -6225,12 +6226,18 @@ static unsigned char *WINAPI NdrContextHandleUnmarshall(
|
||||||
PFORMAT_STRING pFormat,
|
PFORMAT_STRING pFormat,
|
||||||
unsigned char fMustAlloc)
|
unsigned char fMustAlloc)
|
||||||
{
|
{
|
||||||
|
TRACE("pStubMsg %p, ppMemory %p, pFormat %p, fMustAlloc %s\n", pStubMsg,
|
||||||
|
ppMemory, pFormat, fMustAlloc ? "TRUE": "FALSE");
|
||||||
|
|
||||||
if (*pFormat != RPC_FC_BIND_CONTEXT)
|
if (*pFormat != RPC_FC_BIND_CONTEXT)
|
||||||
{
|
{
|
||||||
ERR("invalid format type %x\n", *pFormat);
|
ERR("invalid format type %x\n", *pFormat);
|
||||||
RpcRaiseException(RPC_S_INTERNAL_ERROR);
|
RpcRaiseException(RPC_S_INTERNAL_ERROR);
|
||||||
}
|
}
|
||||||
|
TRACE("flags: 0x%02x\n", pFormat[1]);
|
||||||
|
|
||||||
|
/* [out]-only or [ret] param */
|
||||||
|
if ((pFormat[1] & 0x60) == 0x20)
|
||||||
**(NDR_CCONTEXT **)ppMemory = NULL;
|
**(NDR_CCONTEXT **)ppMemory = NULL;
|
||||||
NdrClientContextUnmarshall(pStubMsg, *(NDR_CCONTEXT **)ppMemory, pStubMsg->RpcMsg->Handle);
|
NdrClientContextUnmarshall(pStubMsg, *(NDR_CCONTEXT **)ppMemory, pStubMsg->RpcMsg->Handle);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue