Merge pull request #11603 from akallabeth/deactivate-all

[core,activation] skip sending PDU_TYPE_DEACTIVATE_ALL
This commit is contained in:
akallabeth
2025-05-19 18:03:15 +02:00
committed by GitHub

View File

@@ -660,6 +660,16 @@ BOOL rdp_recv_deactivate_all(rdpRdp* rdp, wStream* s)
BOOL rdp_send_deactivate_all(rdpRdp* rdp)
{
WINPR_ASSERT(rdp);
WINPR_ASSERT(rdp->mcs);
if (rdp->mcs->userId == 0)
{
WLog_Print(rdp->log, WLOG_WARN,
"rdpMcs::userId == 0, skip sending PDU_TYPE_DEACTIVATE_ALL");
return TRUE;
}
UINT16 sec_flags = 0;
wStream* s = rdp_send_stream_pdu_init(rdp, &sec_flags);
BOOL status = FALSE;
@@ -667,7 +677,7 @@ BOOL rdp_send_deactivate_all(rdpRdp* rdp)
if (!s)
return FALSE;
if (!Stream_CheckAndLogRequiredCapacity(TAG, (s), 7))
if (!Stream_CheckAndLogRequiredCapacityWLog(rdp->log, (s), 7))
goto fail;
WINPR_ASSERT(rdp->settings);