Module: wine Branch: refs/heads/master Commit: a4000349f8ba130b863c4d58aea2b320b5799759 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=a4000349f8ba130b863c4d58...
Author: Robert Shearman rob@codeweavers.com Date: Wed Jan 18 11:29:38 2006 +0100
rpcrt4: Fix the sending of >5800 byte messages by only adding offset to the buffer after the first batch of data has been written to the pipe.
---
dlls/rpcrt4/rpc_message.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/rpcrt4/rpc_message.c b/dlls/rpcrt4/rpc_message.c index 0dce2e8..d47f9d9 100644 --- a/dlls/rpcrt4/rpc_message.c +++ b/dlls/rpcrt4/rpc_message.c @@ -254,15 +254,13 @@ RPC_STATUS RPCRT4_Send(RpcConnection *Co hdr_size = Header->common.frag_len; Header->common.flags |= RPC_FLG_FIRST; Header->common.flags &= ~RPC_FLG_LAST; - while (!(Header->common.flags & RPC_FLG_LAST)) { + while (!(Header->common.flags & RPC_FLG_LAST)) { /* decide if we need to split the packet into fragments */ if ((BufferLength + hdr_size) <= Connection->MaxTransmissionSize) { Header->common.flags |= RPC_FLG_LAST; Header->common.frag_len = BufferLength + hdr_size; } else { Header->common.frag_len = Connection->MaxTransmissionSize; - buffer_pos += Header->common.frag_len - hdr_size; - BufferLength -= Header->common.frag_len - hdr_size; }
/* transmit packet header */ @@ -283,6 +281,8 @@ RPC_STATUS RPCRT4_Send(RpcConnection *Co return GetLastError(); }
+ buffer_pos += Header->common.frag_len - hdr_size; + BufferLength -= Header->common.frag_len - hdr_size; Header->common.flags &= ~RPC_FLG_FIRST; }