From 68bd3b63ae3ef27256e9b155b5a5aa886f08b67b Mon Sep 17 00:00:00 2001 From: akallabeth Date: Tue, 22 Nov 2022 11:05:57 +0100 Subject: [PATCH] [server] Fix rdp_peer_handle_state_demand_active * Return type is state_run_t * Fix use, check for success --- libfreerdp/core/connection.c | 4 +++- libfreerdp/core/peer.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libfreerdp/core/connection.c b/libfreerdp/core/connection.c index d599c3bce..53ce1f6dd 100644 --- a/libfreerdp/core/connection.c +++ b/libfreerdp/core/connection.c @@ -1584,7 +1584,9 @@ BOOL rdp_server_reactivate(rdpRdp* rdp) rdp_finalize_set_flag(rdp, FINALIZE_DEACTIVATE_REACTIVATE); if (!rdp_server_transition_to_state(rdp, CONNECTION_STATE_CAPABILITIES_EXCHANGE_DEMAND_ACTIVE)) return FALSE; - return rdp_peer_handle_state_demand_active(client) > 0; + + state_run_t rc = rdp_peer_handle_state_demand_active(client); + return state_run_success(rc); } BOOL rdp_server_transition_to_state(rdpRdp* rdp, CONNECTION_STATE state) diff --git a/libfreerdp/core/peer.h b/libfreerdp/core/peer.h index 57cecce6c..f405d9b14 100644 --- a/libfreerdp/core/peer.h +++ b/libfreerdp/core/peer.h @@ -26,6 +26,6 @@ #include -FREERDP_LOCAL int rdp_peer_handle_state_demand_active(freerdp_peer* client); +FREERDP_LOCAL state_run_t rdp_peer_handle_state_demand_active(freerdp_peer* client); #endif /* FREERDP_LIB_CORE_PEER_H */