Commit a0410bef authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

rpcrt4: Print fixme's if the serialize or no-serialize flags are set on a…

rpcrt4: Print fixme's if the serialize or no-serialize flags are set on a context handle being marshalled or unmarshalled.
parent 15af19c6
...@@ -218,7 +218,8 @@ void WINAPI NDRSContextMarshall(NDR_SCONTEXT SContext, ...@@ -218,7 +218,8 @@ void WINAPI NDRSContextMarshall(NDR_SCONTEXT SContext,
NDR_RUNDOWN userRunDownIn) NDR_RUNDOWN userRunDownIn)
{ {
TRACE("(%p %p %p)\n", SContext, pBuff, userRunDownIn); TRACE("(%p %p %p)\n", SContext, pBuff, userRunDownIn);
NDRSContextMarshall2(I_RpcGetCurrentCallHandle(), SContext, pBuff, userRunDownIn, NULL, 0); NDRSContextMarshall2(I_RpcGetCurrentCallHandle(), SContext, pBuff,
userRunDownIn, NULL, RPC_CONTEXT_HANDLE_DEFAULT_FLAGS);
} }
/*********************************************************************** /***********************************************************************
...@@ -230,7 +231,8 @@ void WINAPI NDRSContextMarshallEx(RPC_BINDING_HANDLE hBinding, ...@@ -230,7 +231,8 @@ void WINAPI NDRSContextMarshallEx(RPC_BINDING_HANDLE hBinding,
NDR_RUNDOWN userRunDownIn) NDR_RUNDOWN userRunDownIn)
{ {
TRACE("(%p %p %p %p)\n", hBinding, SContext, pBuff, userRunDownIn); TRACE("(%p %p %p %p)\n", hBinding, SContext, pBuff, userRunDownIn);
NDRSContextMarshall2(hBinding, SContext, pBuff, userRunDownIn, NULL, 0); NDRSContextMarshall2(hBinding, SContext, pBuff, userRunDownIn, NULL,
RPC_CONTEXT_HANDLE_DEFAULT_FLAGS);
} }
/*********************************************************************** /***********************************************************************
...@@ -252,6 +254,9 @@ void WINAPI NDRSContextMarshall2(RPC_BINDING_HANDLE hBinding, ...@@ -252,6 +254,9 @@ void WINAPI NDRSContextMarshall2(RPC_BINDING_HANDLE hBinding,
if (!binding->server || !binding->Assoc) if (!binding->server || !binding->Assoc)
RpcRaiseException(ERROR_INVALID_HANDLE); RpcRaiseException(ERROR_INVALID_HANDLE);
if (Flags & RPC_CONTEXT_HANDLE_FLAGS)
FIXME("unimplemented flags: 0x%x\n", Flags & RPC_CONTEXT_HANDLE_FLAGS);
if (SContext->userContext) if (SContext->userContext)
{ {
status = RpcServerAssoc_UpdateContextHandle(binding->Assoc, SContext, CtxGuard, userRunDownIn); status = RpcServerAssoc_UpdateContextHandle(binding->Assoc, SContext, CtxGuard, userRunDownIn);
...@@ -287,7 +292,9 @@ NDR_SCONTEXT WINAPI NDRSContextUnmarshall(void *pBuff, ...@@ -287,7 +292,9 @@ NDR_SCONTEXT WINAPI NDRSContextUnmarshall(void *pBuff,
ULONG DataRepresentation) ULONG DataRepresentation)
{ {
TRACE("(%p %08x)\n", pBuff, DataRepresentation); TRACE("(%p %08x)\n", pBuff, DataRepresentation);
return NDRSContextUnmarshall2(I_RpcGetCurrentCallHandle(), pBuff, DataRepresentation, NULL, 0); return NDRSContextUnmarshall2(I_RpcGetCurrentCallHandle(), pBuff,
DataRepresentation, NULL,
RPC_CONTEXT_HANDLE_DEFAULT_FLAGS);
} }
/*********************************************************************** /***********************************************************************
...@@ -298,7 +305,8 @@ NDR_SCONTEXT WINAPI NDRSContextUnmarshallEx(RPC_BINDING_HANDLE hBinding, ...@@ -298,7 +305,8 @@ NDR_SCONTEXT WINAPI NDRSContextUnmarshallEx(RPC_BINDING_HANDLE hBinding,
ULONG DataRepresentation) ULONG DataRepresentation)
{ {
TRACE("(%p %p %08x)\n", hBinding, pBuff, DataRepresentation); TRACE("(%p %p %08x)\n", hBinding, pBuff, DataRepresentation);
return NDRSContextUnmarshall2(hBinding, pBuff, DataRepresentation, NULL, 0); return NDRSContextUnmarshall2(hBinding, pBuff, DataRepresentation, NULL,
RPC_CONTEXT_HANDLE_DEFAULT_FLAGS);
} }
/*********************************************************************** /***********************************************************************
...@@ -319,6 +327,9 @@ NDR_SCONTEXT WINAPI NDRSContextUnmarshall2(RPC_BINDING_HANDLE hBinding, ...@@ -319,6 +327,9 @@ NDR_SCONTEXT WINAPI NDRSContextUnmarshall2(RPC_BINDING_HANDLE hBinding,
if (!binding->server || !binding->Assoc) if (!binding->server || !binding->Assoc)
RpcRaiseException(ERROR_INVALID_HANDLE); RpcRaiseException(ERROR_INVALID_HANDLE);
if (Flags & RPC_CONTEXT_HANDLE_FLAGS)
FIXME("unimplemented flags: 0x%x\n", Flags & RPC_CONTEXT_HANDLE_FLAGS);
if (!pBuff) if (!pBuff)
status = RpcServerAssoc_AllocateContextHandle(binding->Assoc, CtxGuard, status = RpcServerAssoc_AllocateContextHandle(binding->Assoc, CtxGuard,
&SContext); &SContext);
......
...@@ -6241,7 +6241,8 @@ void WINAPI NdrServerContextMarshall(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -6241,7 +6241,8 @@ void WINAPI NdrServerContextMarshall(PMIDL_STUB_MESSAGE pStubMsg,
} }
NDRSContextMarshall2(pStubMsg->RpcMsg->Handle, ContextHandle, NDRSContextMarshall2(pStubMsg->RpcMsg->Handle, ContextHandle,
pStubMsg->Buffer, RundownRoutine, NULL, 0); pStubMsg->Buffer, RundownRoutine, NULL,
RPC_CONTEXT_HANDLE_DEFAULT_FLAGS);
pStubMsg->Buffer += cbNDRContext; pStubMsg->Buffer += cbNDRContext;
} }
...@@ -6263,7 +6264,7 @@ NDR_SCONTEXT WINAPI NdrServerContextUnmarshall(PMIDL_STUB_MESSAGE pStubMsg) ...@@ -6263,7 +6264,7 @@ NDR_SCONTEXT WINAPI NdrServerContextUnmarshall(PMIDL_STUB_MESSAGE pStubMsg)
ContextHandle = NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle, ContextHandle = NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle,
pStubMsg->Buffer, pStubMsg->Buffer,
pStubMsg->RpcMsg->DataRepresentation, pStubMsg->RpcMsg->DataRepresentation,
NULL, 0); NULL, RPC_CONTEXT_HANDLE_DEFAULT_FLAGS);
pStubMsg->Buffer += cbNDRContext; pStubMsg->Buffer += cbNDRContext;
return ContextHandle; return ContextHandle;
...@@ -6280,9 +6281,14 @@ NDR_SCONTEXT WINAPI NdrContextHandleInitialize(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -6280,9 +6281,14 @@ NDR_SCONTEXT WINAPI NdrContextHandleInitialize(PMIDL_STUB_MESSAGE pStubMsg,
PFORMAT_STRING pFormat) PFORMAT_STRING pFormat)
{ {
RPC_SYNTAX_IDENTIFIER *if_id = NULL; RPC_SYNTAX_IDENTIFIER *if_id = NULL;
ULONG flags = RPC_CONTEXT_HANDLE_DEFAULT_FLAGS;
TRACE("(%p, %p)\n", pStubMsg, pFormat); TRACE("(%p, %p)\n", pStubMsg, pFormat);
if (pFormat[1] & NDR_CONTEXT_HANDLE_SERIALIZE)
flags |= RPC_CONTEXT_HANDLE_SERIALIZE;
if (pFormat[1] & NDR_CONTEXT_HANDLE_NO_SERIALIZE)
flags |= RPC_CONTEXT_HANDLE_DONT_SERIALIZE;
if (pFormat[1] & NDR_STRICT_CONTEXT_HANDLE) if (pFormat[1] & NDR_STRICT_CONTEXT_HANDLE)
{ {
RPC_SERVER_INTERFACE *sif = pStubMsg->StubDesc->RpcInterfaceInformation; RPC_SERVER_INTERFACE *sif = pStubMsg->StubDesc->RpcInterfaceInformation;
...@@ -6290,7 +6296,8 @@ NDR_SCONTEXT WINAPI NdrContextHandleInitialize(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -6290,7 +6296,8 @@ NDR_SCONTEXT WINAPI NdrContextHandleInitialize(PMIDL_STUB_MESSAGE pStubMsg,
} }
return NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle, NULL, return NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle, NULL,
pStubMsg->RpcMsg->DataRepresentation, if_id, 0); pStubMsg->RpcMsg->DataRepresentation, if_id,
flags);
} }
void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg, void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg,
...@@ -6299,6 +6306,7 @@ void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -6299,6 +6306,7 @@ void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg,
PFORMAT_STRING pFormat) PFORMAT_STRING pFormat)
{ {
RPC_SYNTAX_IDENTIFIER *if_id = NULL; RPC_SYNTAX_IDENTIFIER *if_id = NULL;
ULONG flags = RPC_CONTEXT_HANDLE_DEFAULT_FLAGS;
TRACE("(%p, %p, %p, %p)\n", pStubMsg, ContextHandle, RundownRoutine, pFormat); TRACE("(%p, %p, %p, %p)\n", pStubMsg, ContextHandle, RundownRoutine, pFormat);
...@@ -6311,6 +6319,10 @@ void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -6311,6 +6319,10 @@ void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg,
RpcRaiseException(RPC_X_BAD_STUB_DATA); RpcRaiseException(RPC_X_BAD_STUB_DATA);
} }
if (pFormat[1] & NDR_CONTEXT_HANDLE_SERIALIZE)
flags |= RPC_CONTEXT_HANDLE_SERIALIZE;
if (pFormat[1] & NDR_CONTEXT_HANDLE_NO_SERIALIZE)
flags |= RPC_CONTEXT_HANDLE_DONT_SERIALIZE;
if (pFormat[1] & NDR_STRICT_CONTEXT_HANDLE) if (pFormat[1] & NDR_STRICT_CONTEXT_HANDLE)
{ {
RPC_SERVER_INTERFACE *sif = pStubMsg->StubDesc->RpcInterfaceInformation; RPC_SERVER_INTERFACE *sif = pStubMsg->StubDesc->RpcInterfaceInformation;
...@@ -6318,7 +6330,7 @@ void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -6318,7 +6330,7 @@ void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg,
} }
NDRSContextMarshall2(pStubMsg->RpcMsg->Handle, ContextHandle, NDRSContextMarshall2(pStubMsg->RpcMsg->Handle, ContextHandle,
pStubMsg->Buffer, RundownRoutine, if_id, 0); pStubMsg->Buffer, RundownRoutine, if_id, flags);
pStubMsg->Buffer += cbNDRContext; pStubMsg->Buffer += cbNDRContext;
} }
...@@ -6327,6 +6339,7 @@ NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -6327,6 +6339,7 @@ NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
{ {
NDR_SCONTEXT ContextHandle; NDR_SCONTEXT ContextHandle;
RPC_SYNTAX_IDENTIFIER *if_id = NULL; RPC_SYNTAX_IDENTIFIER *if_id = NULL;
ULONG flags = RPC_CONTEXT_HANDLE_DEFAULT_FLAGS;
TRACE("(%p, %p)\n", pStubMsg, pFormat); TRACE("(%p, %p)\n", pStubMsg, pFormat);
...@@ -6339,6 +6352,10 @@ NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -6339,6 +6352,10 @@ NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
RpcRaiseException(RPC_X_BAD_STUB_DATA); RpcRaiseException(RPC_X_BAD_STUB_DATA);
} }
if (pFormat[1] & NDR_CONTEXT_HANDLE_SERIALIZE)
flags |= RPC_CONTEXT_HANDLE_SERIALIZE;
if (pFormat[1] & NDR_CONTEXT_HANDLE_NO_SERIALIZE)
flags |= RPC_CONTEXT_HANDLE_DONT_SERIALIZE;
if (pFormat[1] & NDR_STRICT_CONTEXT_HANDLE) if (pFormat[1] & NDR_STRICT_CONTEXT_HANDLE)
{ {
RPC_SERVER_INTERFACE *sif = pStubMsg->StubDesc->RpcInterfaceInformation; RPC_SERVER_INTERFACE *sif = pStubMsg->StubDesc->RpcInterfaceInformation;
...@@ -6348,7 +6365,7 @@ NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -6348,7 +6365,7 @@ NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
ContextHandle = NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle, ContextHandle = NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle,
pStubMsg->Buffer, pStubMsg->Buffer,
pStubMsg->RpcMsg->DataRepresentation, pStubMsg->RpcMsg->DataRepresentation,
if_id, 0); if_id, flags);
pStubMsg->Buffer += cbNDRContext; pStubMsg->Buffer += cbNDRContext;
return ContextHandle; return ContextHandle;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment