Reparse command line after RDP or assistance file.
authorArmin Novak <armin.novak@thincast.com>
Mon, 7 Mar 2016 08:43:53 +0000 (09:43 +0100)
committerArmin Novak <armin.novak@thincast.com>
Mon, 7 Mar 2016 08:45:09 +0000 (09:45 +0100)
client/common/client.c

index a847c9b..e0583e0 100644 (file)
@@ -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)