From 940317282cdc5ea468609df6c224e4597c7c97bd Mon Sep 17 00:00:00 2001 From: garbb Date: Sun, 18 Sep 2022 12:09:23 -0700 Subject: [PATCH] remember participantId for use with assistance set control request --- client/common/client.c | 5 ++++- include/freerdp/client/encomsp.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/client/common/client.c b/client/common/client.c index dcb6ece97..1b5207f9c 100644 --- a/client/common/client.c +++ b/client/common/client.c @@ -984,7 +984,7 @@ BOOL freerdp_client_encomsp_set_control(EncomspClientContext* encomsp, BOOL cont if (!encomsp) return FALSE; - pdu.ParticipantId = 0; + pdu.ParticipantId = encomsp->participantId; pdu.Flags = ENCOMSP_REQUEST_VIEW; if (control) @@ -1013,6 +1013,9 @@ client_encomsp_participant_created(EncomspClientContext* context, settings = cctx->context.settings; WINPR_ASSERT(settings); + if (participantCreated->Flags & ENCOMSP_IS_PARTICIPANT) + context->participantId = participantCreated->ParticipantId; + request = freerdp_settings_get_bool(settings, FreeRDP_RemoteAssistanceRequestControl); if (request && (participantCreated->Flags & ENCOMSP_MAY_VIEW) && !(participantCreated->Flags & ENCOMSP_MAY_INTERACT)) diff --git a/include/freerdp/client/encomsp.h b/include/freerdp/client/encomsp.h index 361a9ff64..4958e619a 100644 --- a/include/freerdp/client/encomsp.h +++ b/include/freerdp/client/encomsp.h @@ -71,6 +71,8 @@ struct s_encomsp_client_context pcEncomspChangeParticipantControlLevel ChangeParticipantControlLevel; pcEncomspGraphicsStreamPaused GraphicsStreamPaused; pcEncomspGraphicsStreamResumed GraphicsStreamResumed; + + UINT32 participantId; }; #endif /* FREERDP_CHANNEL_ENCOMSP_CLIENT_ENCOMSP_H */