[channels,rdpdr] fix drive redirection hotplug

Currently, after receiving PAKID_CORE_USER_LOGGEDON, the client will
switch to RDPDR_CHANNEL_STATE_USER_LOGGEDON, send Device List
Announce, then switch back to RDPDR_CHANNEL_STATE_READY.  As a result,
any drives mounted later will not be announced.
This commit is contained in:
James Fu 2024-07-10 15:40:04 +08:00 committed by Armin Novak
parent 3838b18b58
commit 0755325f77
No known key found for this signature in database
GPG Key ID: 2CF4A2D2D3D72105

View File

@ -1456,14 +1456,14 @@ static UINT rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL use
UINT rdpdr_try_send_device_list_announce_request(rdpdrPlugin* rdpdr)
{
WINPR_ASSERT(rdpdr);
if (rdpdr->state != RDPDR_CHANNEL_STATE_USER_LOGGEDON)
if (rdpdr->state != RDPDR_CHANNEL_STATE_READY)
{
WLog_Print(rdpdr->log, WLOG_DEBUG,
"hotplug event received, but channel [RDPDR] is not ready (state %s), ignoring.",
rdpdr_state_str(rdpdr->state));
return CHANNEL_RC_OK;
}
return rdpdr_send_device_list_announce_request(rdpdr, TRUE);
return rdpdr_send_device_list_announce_request(rdpdr, rdpdr->userLoggedOn);
}
static UINT dummy_irp_response(rdpdrPlugin* rdpdr, wStream* s)