From 4bb33e904a1eb09b201f16aae77e545391e509d8 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Mon, 7 Mar 2016 09:43:53 +0100 Subject: [PATCH] Reparse command line after RDP or assistance file. --- client/common/client.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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)