rdpdr: use host name for redirected drives if set

When a client set the host name, redirected drives would still be shown
as coming from the computer name. For example if the computer the client
run on is called "foo" and the client set the /host-name to "bar" any
redirected drive is shown as "driveX on foo".

Now the host name is used for drives when set.
This commit is contained in:
Bernhard Miklautz 2014-12-30 13:34:11 +01:00
parent 3b332e7829
commit b485bb2067

View File

@ -506,8 +506,10 @@ static void rdpdr_process_connect(rdpdrPlugin* rdpdr)
rdpdr->devman = devman_new(rdpdr);
settings = (rdpSettings*) rdpdr->channelEntryPoints.pExtendedData;
strncpy(rdpdr->computerName, settings->ComputerName, sizeof(rdpdr->computerName) - 1);
if (settings->ClientHostname)
strncpy(rdpdr->computerName, settings->ClientHostname, sizeof(rdpdr->computerName) - 1);
else
strncpy(rdpdr->computerName, settings->ComputerName, sizeof(rdpdr->computerName) - 1);
for (index = 0; index < settings->DeviceCount; index++)
{