common: Fix parsing of rdp file domain info
`freerdp_parse_username` always returns non-NULL domain information when called. This currently results in `settings->domain` being overridden in every case, even though we might have read domain information from the file before. This PR fixes this issue by checking if domain information was present in the file and if not use the parsed domain informatin.
This commit is contained in:
parent
3a6566d35e
commit
912b30ba06
@ -1399,7 +1399,7 @@ BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings*
|
||||
if (!freerdp_settings_set_string(settings, FreeRDP_Username, user))
|
||||
return FALSE;
|
||||
|
||||
if (domain)
|
||||
if (!(~((size_t)file->Domain)) && domain)
|
||||
{
|
||||
if (!freerdp_settings_set_string(settings, FreeRDP_Domain, domain))
|
||||
return FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user