libfreerdp-core: silence false error on server disconnect
This commit is contained in:
parent
d8ddfd83c3
commit
701186e461
@ -721,6 +721,8 @@ typedef struct rpc_client RpcClient;
|
||||
struct rdp_rpc
|
||||
{
|
||||
RPC_CLIENT_STATE State;
|
||||
|
||||
UINT32 result;
|
||||
|
||||
rdpTls* TlsIn;
|
||||
rdpTls* TlsOut;
|
||||
|
@ -93,7 +93,6 @@ int rpc_client_receive_pool_return(rdpRpc* rpc, RPC_PDU* pdu)
|
||||
int rpc_client_on_fragment_received_event(rdpRpc* rpc)
|
||||
{
|
||||
BYTE* buffer;
|
||||
UINT32 result;
|
||||
UINT32 StubOffset;
|
||||
UINT32 StubLength;
|
||||
wStream* fragment;
|
||||
@ -161,12 +160,10 @@ int rpc_client_on_fragment_received_event(rdpRpc* rpc)
|
||||
|
||||
if (StubLength == 4)
|
||||
{
|
||||
//WLog_DBG(TAG, "Got stub length 4 with flags %d and callid %d", header->common.pfc_flags, header->common.call_id);
|
||||
|
||||
/* received a disconnect request from the server? */
|
||||
if ((header->common.call_id == rpc->PipeCallId) && (header->common.pfc_flags & PFC_LAST_FRAG))
|
||||
{
|
||||
result = *((UINT32*) &buffer[StubOffset]); /* TODO: use this status code */
|
||||
rpc->result = *((UINT32*) &buffer[StubOffset]);
|
||||
|
||||
TerminateEventArgs e;
|
||||
rpc->context->rdp->disconnect = TRUE;
|
||||
@ -242,10 +239,7 @@ int rpc_client_on_read_event(rdpRpc* rpc)
|
||||
RPC_COMMON_FIELDS_LENGTH - Stream_GetPosition(rpc->client->RecvFrag));
|
||||
|
||||
if (status < 0)
|
||||
{
|
||||
WLog_ERR(TAG, "rpc_client_frag_read: error reading header");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!status)
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user