Robert Shearman : rpcrt4: Increment the call id field of the request header .

Alexandre Julliard julliard at wine.codeweavers.com
Thu May 18 03:56:54 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 5067ea70c08a6c3b8dff815085768ddd368a15fc
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=5067ea70c08a6c3b8dff815085768ddd368a15fc

Author: Robert Shearman <rob at codeweavers.com>
Date:   Thu May 18 03:39:42 2006 +0100

rpcrt4: Increment the call id field of the request header.

This is necessary for compatibility with MS/RPC servers.

---

 dlls/rpcrt4/rpc_binding.h   |    1 +
 dlls/rpcrt4/rpc_message.c   |    1 +
 dlls/rpcrt4/rpc_transport.c |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/rpcrt4/rpc_binding.h b/dlls/rpcrt4/rpc_binding.h
index 99916a5..d9e1576 100644
--- a/dlls/rpcrt4/rpc_binding.h
+++ b/dlls/rpcrt4/rpc_binding.h
@@ -37,6 +37,7 @@ typedef struct _RpcConnection
   USHORT MaxTransmissionSize;
   /* The active interface bound to server. */
   RPC_SYNTAX_IDENTIFIER ActiveInterface;
+  USHORT NextCallId;
 
   /* authentication */
   CtxtHandle ctx;
diff --git a/dlls/rpcrt4/rpc_message.c b/dlls/rpcrt4/rpc_message.c
index f279910..a4d92b6 100644
--- a/dlls/rpcrt4/rpc_message.c
+++ b/dlls/rpcrt4/rpc_message.c
@@ -666,6 +666,7 @@ RPC_STATUS WINAPI I_RpcSend(PRPC_MESSAGE
     hdr = RPCRT4_BuildRequestHeader(pMsg->DataRepresentation,
                                     pMsg->BufferLength, pMsg->ProcNum,
                                     &bind->ObjectUuid);
+    hdr->common.call_id = conn->NextCallId++;
   }
 
   status = RPCRT4_Send(conn, hdr, pMsg->Buffer, pMsg->BufferLength);
diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c
index 0db5b6a..88a7769 100644
--- a/dlls/rpcrt4/rpc_transport.c
+++ b/dlls/rpcrt4/rpc_transport.c
@@ -451,6 +451,7 @@ RPC_STATUS RPCRT4_CreateConnection(RpcCo
   NewConnection->Endpoint = RPCRT4_strdupA(Endpoint);
   NewConnection->Used = Binding;
   NewConnection->MaxTransmissionSize = RPC_MAX_PACKET_SIZE;
+  NewConnection->NextCallId = 1;
 
   TRACE("connection: %p\n", NewConnection);
   *Connection = NewConnection;




More information about the wine-cvs mailing list