diff --git a/client/common/client.c b/client/common/client.c index a847c9b34..e0583e0e8 100644 --- a/client/common/client.c +++ b/client/common/client.c @@ -196,14 +196,19 @@ int freerdp_client_settings_parse_command_line(rdpSettings* settings, int argc, status = freerdp_client_settings_parse_command_line_arguments(settings, argc, argv, allowUnknown); if (settings->ConnectionFile) - { status = freerdp_client_settings_parse_connection_file(settings, settings->ConnectionFile); - } if (settings->AssistanceFile) - { status = freerdp_client_settings_parse_assistance_file(settings, settings->AssistanceFile); - } + + if (status < 0) + return status; + + /* In case settings have been populated from a RDP or assistance file + * reparse the command line to give priotiry to command line for concurring settings. + */ + if (settings->ConnectionFile || settings->AssistanceFile) + status = freerdp_client_settings_parse_command_line_arguments(settings, argc, argv, allowUnknown); /* Only call post processing if no status/error was returned*/ if (status < 0)