From 5067ea70c08a6c3b8dff815085768ddd368a15fc Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Thu, 18 May 2006 03:39:42 +0100 Subject: [PATCH] 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(+) diff --git a/dlls/rpcrt4/rpc_binding.h b/dlls/rpcrt4/rpc_binding.h index 99916a511f..d9e1576f63 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 f279910ab0..a4d92b69f1 100644 --- a/dlls/rpcrt4/rpc_message.c +++ b/dlls/rpcrt4/rpc_message.c @@ -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); diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index 0db5b6af93..88a7769360 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -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;