Rob Shearman : rpcrt4: Set the fBufferValid flag in NdrProxyGetBuffer. <rob at codeweavers.com>

svn path=/trunk/; revision=31848
This commit is contained in:
Christoph von Wittich 2008-01-18 10:05:52 +00:00
parent 714d031d4f
commit e83b5427a6

View file

@ -364,6 +364,7 @@ void WINAPI NdrProxyGetBuffer(void *This,
RpcRaiseException(hr); RpcRaiseException(hr);
return; return;
} }
pStubMsg->fBufferValid = TRUE;
pStubMsg->BufferStart = pStubMsg->RpcMsg->Buffer; pStubMsg->BufferStart = pStubMsg->RpcMsg->Buffer;
pStubMsg->BufferEnd = pStubMsg->BufferStart + pStubMsg->BufferLength; pStubMsg->BufferEnd = pStubMsg->BufferStart + pStubMsg->BufferLength;
pStubMsg->Buffer = pStubMsg->BufferStart; pStubMsg->Buffer = pStubMsg->BufferStart;
@ -408,11 +409,13 @@ void WINAPI NdrProxySendReceive(void *This,
void WINAPI NdrProxyFreeBuffer(void *This, void WINAPI NdrProxyFreeBuffer(void *This,
PMIDL_STUB_MESSAGE pStubMsg) PMIDL_STUB_MESSAGE pStubMsg)
{ {
HRESULT hr;
TRACE("(%p,%p)\n", This, pStubMsg); TRACE("(%p,%p)\n", This, pStubMsg);
hr = IRpcChannelBuffer_FreeBuffer(pStubMsg->pRpcChannelBuffer, if (pStubMsg->fBufferValid)
(RPCOLEMESSAGE*)pStubMsg->RpcMsg); {
IRpcChannelBuffer_FreeBuffer(pStubMsg->pRpcChannelBuffer,
(RPCOLEMESSAGE*)pStubMsg->RpcMsg);
pStubMsg->fBufferValid = TRUE;
}
} }
/*********************************************************************** /***********************************************************************