Rob Shearman : rpcrt4: Print fixme' s if the serialize or no-serialize flags are set on a context handle being marshalled or unmarshalled .

Alexandre Julliard julliard at winehq.org
Mon Jan 7 08:39:23 CST 2008


Module: wine
Branch: master
Commit: a0410bef34c3012f31328c07f92e3676c29680b7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a0410bef34c3012f31328c07f92e3676c29680b7

Author: Rob Shearman <rob at codeweavers.com>
Date:   Sun Jan  6 21:26:10 2008 +0000

rpcrt4: Print fixme's if the serialize or no-serialize flags are set on a context handle being marshalled or unmarshalled.

---

 dlls/rpcrt4/ndr_contexthandle.c |   19 +++++++++++++++----
 dlls/rpcrt4/ndr_marshall.c      |   27 ++++++++++++++++++++++-----
 2 files changed, 37 insertions(+), 9 deletions(-)

diff --git a/dlls/rpcrt4/ndr_contexthandle.c b/dlls/rpcrt4/ndr_contexthandle.c
index 21d8747..7334bf6 100644
--- a/dlls/rpcrt4/ndr_contexthandle.c
+++ b/dlls/rpcrt4/ndr_contexthandle.c
@@ -218,7 +218,8 @@ void WINAPI NDRSContextMarshall(NDR_SCONTEXT SContext,
                                NDR_RUNDOWN 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,
                                   NDR_RUNDOWN 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,
     if (!binding->server || !binding->Assoc)
         RpcRaiseException(ERROR_INVALID_HANDLE);
 
+    if (Flags & RPC_CONTEXT_HANDLE_FLAGS)
+        FIXME("unimplemented flags: 0x%x\n", Flags & RPC_CONTEXT_HANDLE_FLAGS);
+
     if (SContext->userContext)
     {
         status = RpcServerAssoc_UpdateContextHandle(binding->Assoc, SContext, CtxGuard, userRunDownIn);
@@ -287,7 +292,9 @@ NDR_SCONTEXT WINAPI NDRSContextUnmarshall(void *pBuff,
                                           ULONG 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,
                                             ULONG 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,
     if (!binding->server || !binding->Assoc)
         RpcRaiseException(ERROR_INVALID_HANDLE);
 
+    if (Flags & RPC_CONTEXT_HANDLE_FLAGS)
+        FIXME("unimplemented flags: 0x%x\n", Flags & RPC_CONTEXT_HANDLE_FLAGS);
+
     if (!pBuff)
         status = RpcServerAssoc_AllocateContextHandle(binding->Assoc, CtxGuard,
                                                       &SContext);
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index dcbb4fd..f8f8973 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -6241,7 +6241,8 @@ void WINAPI NdrServerContextMarshall(PMIDL_STUB_MESSAGE pStubMsg,
     }
 
     NDRSContextMarshall2(pStubMsg->RpcMsg->Handle, ContextHandle,
-                         pStubMsg->Buffer, RundownRoutine, NULL, 0);
+                         pStubMsg->Buffer, RundownRoutine, NULL,
+                         RPC_CONTEXT_HANDLE_DEFAULT_FLAGS);
     pStubMsg->Buffer += cbNDRContext;
 }
 
@@ -6263,7 +6264,7 @@ NDR_SCONTEXT WINAPI NdrServerContextUnmarshall(PMIDL_STUB_MESSAGE pStubMsg)
     ContextHandle = NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle,
                                            pStubMsg->Buffer,
                                            pStubMsg->RpcMsg->DataRepresentation,
-                                           NULL, 0);
+                                           NULL, RPC_CONTEXT_HANDLE_DEFAULT_FLAGS);
     pStubMsg->Buffer += cbNDRContext;
 
     return ContextHandle;
@@ -6280,9 +6281,14 @@ NDR_SCONTEXT WINAPI NdrContextHandleInitialize(PMIDL_STUB_MESSAGE pStubMsg,
                                                PFORMAT_STRING pFormat)
 {
     RPC_SYNTAX_IDENTIFIER *if_id = NULL;
+    ULONG flags = RPC_CONTEXT_HANDLE_DEFAULT_FLAGS;
 
     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)
     {
         RPC_SERVER_INTERFACE *sif = pStubMsg->StubDesc->RpcInterfaceInformation;
@@ -6290,7 +6296,8 @@ NDR_SCONTEXT WINAPI NdrContextHandleInitialize(PMIDL_STUB_MESSAGE pStubMsg,
     }
 
     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,
@@ -6299,6 +6306,7 @@ void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg,
                                         PFORMAT_STRING pFormat)
 {
     RPC_SYNTAX_IDENTIFIER *if_id = NULL;
+    ULONG flags = RPC_CONTEXT_HANDLE_DEFAULT_FLAGS;
 
     TRACE("(%p, %p, %p, %p)\n", pStubMsg, ContextHandle, RundownRoutine, pFormat);
 
@@ -6311,6 +6319,10 @@ void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg,
         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)
     {
         RPC_SERVER_INTERFACE *sif = pStubMsg->StubDesc->RpcInterfaceInformation;
@@ -6318,7 +6330,7 @@ void WINAPI NdrServerContextNewMarshall(PMIDL_STUB_MESSAGE pStubMsg,
     }
 
     NDRSContextMarshall2(pStubMsg->RpcMsg->Handle, ContextHandle,
-                          pStubMsg->Buffer, RundownRoutine, if_id, 0);
+                          pStubMsg->Buffer, RundownRoutine, if_id, flags);
     pStubMsg->Buffer += cbNDRContext;
 }
 
@@ -6327,6 +6339,7 @@ NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
 {
     NDR_SCONTEXT ContextHandle;
     RPC_SYNTAX_IDENTIFIER *if_id = NULL;
+    ULONG flags = RPC_CONTEXT_HANDLE_DEFAULT_FLAGS;
 
     TRACE("(%p, %p)\n", pStubMsg, pFormat);
 
@@ -6339,6 +6352,10 @@ NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
         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)
     {
         RPC_SERVER_INTERFACE *sif = pStubMsg->StubDesc->RpcInterfaceInformation;
@@ -6348,7 +6365,7 @@ NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
     ContextHandle = NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle,
                                            pStubMsg->Buffer,
                                            pStubMsg->RpcMsg->DataRepresentation,
-                                           if_id, 0);
+                                           if_id, flags);
     pStubMsg->Buffer += cbNDRContext;
 
     return ContextHandle;




More information about the wine-cvs mailing list