mirror of https://github.com/FreeRDP/FreeRDP
Parse RDP and assistance files in parser.
The command line parser is now populating the settings with the RDP or assistance file content before parsing the rest of the arguments.
This commit is contained in:
parent
fb44b6880b
commit
fd26624bcb
|
@ -195,22 +195,6 @@ 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)
|
||||
return status;
|
||||
|
||||
|
|
|
@ -321,6 +321,9 @@ static int freerdp_client_command_line_pre_filter(void* context, int index, int
|
|||
if (!(settings->ConnectionFile = _strdup(argv[index])))
|
||||
return COMMAND_LINE_ERROR_MEMORY;
|
||||
|
||||
if (freerdp_client_settings_parse_connection_file(settings, settings->ConnectionFile))
|
||||
return COMMAND_LINE_ERROR_UNEXPECTED_VALUE;
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -333,6 +336,9 @@ static int freerdp_client_command_line_pre_filter(void* context, int index, int
|
|||
if (!(settings->AssistanceFile = _strdup(argv[index])))
|
||||
return COMMAND_LINE_ERROR_MEMORY;
|
||||
|
||||
if (freerdp_client_settings_parse_assistance_file(settings, settings->AssistanceFile) < 0)
|
||||
return COMMAND_LINE_ERROR_UNEXPECTED_VALUE;
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue