rpcrt4: Increment the call id field of the request header.
authorRobert Shearman <rob@codeweavers.com>
Thu, 18 May 2006 02:39:42 +0000 (03:39 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 18 May 2006 08:34:33 +0000 (10:34 +0200)
This is necessary for compatibility with MS/RPC servers.

dlls/rpcrt4/rpc_binding.h
dlls/rpcrt4/rpc_message.c
dlls/rpcrt4/rpc_transport.c

index 99916a5..d9e1576 100644 (file)
@@ -37,6 +37,7 @@ typedef struct _RpcConnection
   USHORT MaxTransmissionSize;
   /* The active interface bound to server. */
   RPC_SYNTAX_IDENTIFIER ActiveInterface;
+  USHORT NextCallId;
 
   /* authentication */
   CtxtHandle ctx;
index f279910..a4d92b6 100644 (file)
@@ -666,6 +666,7 @@ RPC_STATUS WINAPI I_RpcSend(PRPC_MESSAGE pMsg)
     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);
index 0db5b6a..88a7769 100644 (file)
@@ -451,6 +451,7 @@ RPC_STATUS RPCRT4_CreateConnection(RpcConnection** Connection, BOOL server, LPCS
   NewConnection->Endpoint = RPCRT4_strdupA(Endpoint);
   NewConnection->Used = Binding;
   NewConnection->MaxTransmissionSize = RPC_MAX_PACKET_SIZE;
+  NewConnection->NextCallId = 1;
 
   TRACE("connection: %p\n", NewConnection);
   *Connection = NewConnection;