From 6f82ab620422bf503bfd079d0ff787062ed2ec09 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Thu, 12 Sep 2019 10:51:55 +0200 Subject: [PATCH] Hotplugging only for drive redirection. --- channels/rdpdr/client/rdpdr_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index fe13dc756..b7e88c000 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -437,6 +437,9 @@ static UINT handle_hotplug(rdpdrPlugin* rdpdr) if (!device_ext || !device_ext->automount) continue; + if (device_ext->device.type != RDPDR_DTYP_FILESYSTEM) + continue; + if (device_ext->path == NULL) continue; @@ -810,7 +813,7 @@ static UINT handle_hotplug(rdpdrPlugin* rdpdr) DEVICE_DRIVE_EXT* device_ext = (DEVICE_DRIVE_EXT*)ListDictionary_GetItemValue( rdpdr->devman->devices, (void*)keys[j]); - if (!device_ext || !device_ext->path || !device_ext->automount) + if (!device_ext || (device_ext->device.type != RDPDR_DTYP_FILESYSTEM) || !device_ext->path || !device_ext->automount) continue; ConvertFromUnicode(CP_UTF8, 0, device_ext->path, -1, &path, 0, NULL, NULL);