* Though not frequent, it's possible to get TsProxySetupReceivePipe
data of stublength 4 that is actual data. This happens when
header->common.call_id == rpc->PipeCallId &&
!(header->common.pfc_flags & PFC_LAST_FRAG).
This should address GW disconnects that manifest as SSL read errors.
if (StubLength == 4)
{
- /* received a disconnect request from the server? */
if ((header->common.call_id == rpc->PipeCallId) && (header->common.pfc_flags & PFC_LAST_FRAG))
{
+ /* End of TsProxySetupReceivePipe */
TerminateEventArgs e;
rpc->result = *((UINT32*) &buffer[StubOffset]);
EventArgsInit(&e, "freerdp");
e.code = 0;
PubSub_OnTerminate(rpc->context->pubSub, rpc->context, &e);
+ return 0;
}
- return 0;
+ if (header->common.call_id != rpc->PipeCallId)
+ {
+ /* Ignoring non-TsProxySetupReceivePipe Response */
+ return 0;
+ }
}
if (rpc->StubFragCount == 0)