From 3ca26384ee009f2ff40fda2555983c7c435bf6c3 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Tue, 21 Nov 2023 12:53:15 +0100 Subject: [PATCH] [core] only move state on demand active rdp_client_connect_demand_active returns STATE_RUN_ACTIVE if we received it, some other return otherwise --- libfreerdp/core/connection.c | 4 +--- libfreerdp/core/rdp.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libfreerdp/core/connection.c b/libfreerdp/core/connection.c index 3e7b32add..6833d2674 100644 --- a/libfreerdp/core/connection.c +++ b/libfreerdp/core/connection.c @@ -1268,12 +1268,10 @@ state_run_t rdp_client_connect_demand_active(rdpRdp* rdp, wStream* s) case PDU_TYPE_DEMAND_ACTIVE: if (!rdp_recv_demand_active(rdp, s, pduSource, length)) return STATE_RUN_FAILED; - break; + return STATE_RUN_ACTIVE; default: return rdp_recv_out_of_sequence_pdu(rdp, s, pduType, length); } - - return STATE_RUN_SUCCESS; } state_run_t rdp_client_connect_finalize(rdpRdp* rdp) diff --git a/libfreerdp/core/rdp.c b/libfreerdp/core/rdp.c index a1fa16fa1..6c47b060b 100644 --- a/libfreerdp/core/rdp.c +++ b/libfreerdp/core/rdp.c @@ -2041,7 +2041,7 @@ static state_run_t rdp_recv_callback_int(rdpTransport* transport, wStream* s, vo rdp_get_state_string(rdp), state_run_result_string(status, buffer, ARRAYSIZE(buffer))); } - else if (status != STATE_RUN_REDIRECT) + else if (status == STATE_RUN_ACTIVE) { if (!rdp_client_transition_to_state( rdp, CONNECTION_STATE_CAPABILITIES_EXCHANGE_CONFIRM_ACTIVE))