libfreerdp-core: fix pipe call id check
This commit is contained in:
parent
731e606c15
commit
282c950522
@ -426,7 +426,7 @@ int rpc_recv_pdu_fragment(rdpRpc* rpc)
|
|||||||
|
|
||||||
ReleaseMutex(rpc->VirtualConnection->DefaultInChannel->Mutex);
|
ReleaseMutex(rpc->VirtualConnection->DefaultInChannel->Mutex);
|
||||||
|
|
||||||
if (header->common.call_id == rpc->PipeCallId)
|
if ((rpc->PipeCallId) && (header->common.call_id == rpc->PipeCallId))
|
||||||
{
|
{
|
||||||
/* TsProxySetupReceivePipe response! */
|
/* TsProxySetupReceivePipe response! */
|
||||||
}
|
}
|
||||||
@ -519,7 +519,7 @@ RPC_PDU* rpc_recv_pdu(rdpRpc* rpc)
|
|||||||
if (rpc->StubFragCount == 0)
|
if (rpc->StubFragCount == 0)
|
||||||
rpc->StubCallId = header->common.call_id;
|
rpc->StubCallId = header->common.call_id;
|
||||||
|
|
||||||
if (rpc->StubCallId == rpc->PipeCallId)
|
if ((rpc->PipeCallId) && (header->common.call_id == rpc->PipeCallId))
|
||||||
{
|
{
|
||||||
/* TsProxySetupReceivePipe response! */
|
/* TsProxySetupReceivePipe response! */
|
||||||
}
|
}
|
||||||
@ -540,14 +540,8 @@ RPC_PDU* rpc_recv_pdu(rdpRpc* rpc)
|
|||||||
* combined stub data length of all remaining fragment PDUs.
|
* combined stub data length of all remaining fragment PDUs.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//printf("Receiving Fragment #%d FragStubLength: %d FragLength: %d AllocHint: %d StubOffset: %d\n",
|
|
||||||
// rpc->StubFragCount, StubLength, header->common.frag_length, header->response.alloc_hint, rpc->StubOffset);
|
|
||||||
|
|
||||||
if ((header->response.alloc_hint == StubLength))
|
if ((header->response.alloc_hint == StubLength))
|
||||||
{
|
{
|
||||||
//printf("Reassembled PDU (%d):\n", rpc->StubOffset);
|
|
||||||
//freerdp_hexdump(rpc->StubBuffer, rpc->StubOffset);
|
|
||||||
|
|
||||||
rpc->pdu->CallId = rpc->StubCallId;
|
rpc->pdu->CallId = rpc->StubCallId;
|
||||||
rpc->StubLength = rpc->StubOffset;
|
rpc->StubLength = rpc->StubOffset;
|
||||||
|
|
||||||
|
@ -1111,9 +1111,6 @@ int tsg_read(rdpTsg* tsg, BYTE* data, UINT32 length)
|
|||||||
{
|
{
|
||||||
CopyLength = (length < tsg->BytesAvailable) ? length : tsg->BytesAvailable;
|
CopyLength = (length < tsg->BytesAvailable) ? length : tsg->BytesAvailable;
|
||||||
|
|
||||||
//printf("Reading from the same PDU: copy: %d length: %d avail: %d\n",
|
|
||||||
// CopyLength, length, tsg->BytesAvailable);
|
|
||||||
|
|
||||||
CopyMemory(data, &tsg->pdu->Buffer[tsg->BytesRead], CopyLength);
|
CopyMemory(data, &tsg->pdu->Buffer[tsg->BytesRead], CopyLength);
|
||||||
tsg->BytesAvailable -= CopyLength;
|
tsg->BytesAvailable -= CopyLength;
|
||||||
tsg->BytesRead += CopyLength;
|
tsg->BytesRead += CopyLength;
|
||||||
@ -1133,7 +1130,7 @@ int tsg_read(rdpTsg* tsg, BYTE* data, UINT32 length)
|
|||||||
if ((tsg->pdu->Flags & RPC_PDU_FLAG_STUB) && (tsg->pdu->Length == 4))
|
if ((tsg->pdu->Flags & RPC_PDU_FLAG_STUB) && (tsg->pdu->Length == 4))
|
||||||
{
|
{
|
||||||
printf("Ignoring TsProxySetupReceivePipe Response\n");
|
printf("Ignoring TsProxySetupReceivePipe Response\n");
|
||||||
return tsg_read(tsg, data, length);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
tsg->PendingPdu = TRUE;
|
tsg->PendingPdu = TRUE;
|
||||||
@ -1142,9 +1139,6 @@ int tsg_read(rdpTsg* tsg, BYTE* data, UINT32 length)
|
|||||||
|
|
||||||
CopyLength = (length < tsg->BytesAvailable) ? length : tsg->BytesAvailable;
|
CopyLength = (length < tsg->BytesAvailable) ? length : tsg->BytesAvailable;
|
||||||
|
|
||||||
//printf("Reading new PDU: copy: %d length: %d avail: %d\n",
|
|
||||||
// CopyLength, length, tsg->BytesAvailable);
|
|
||||||
|
|
||||||
CopyMemory(data, &tsg->pdu->Buffer[tsg->BytesRead], CopyLength);
|
CopyMemory(data, &tsg->pdu->Buffer[tsg->BytesRead], CopyLength);
|
||||||
tsg->BytesAvailable -= CopyLength;
|
tsg->BytesAvailable -= CopyLength;
|
||||||
tsg->BytesRead += CopyLength;
|
tsg->BytesRead += CopyLength;
|
||||||
|
Loading…
Reference in New Issue
Block a user