Removed GatewayUseSameCredentials logic from cmdline.c, and placed it after both cmdline and rpd file have been parsed. This provides proper GatewayUseSameCredentials support for the rdp file

This commit is contained in:
Justin DeFields 2014-07-24 16:07:14 -04:00
parent c544e9ee9f
commit 2e859a5d14
2 changed files with 26 additions and 15 deletions

View File

@ -123,10 +123,36 @@ int freerdp_client_settings_parse_command_line(rdpSettings* settings, int argc,
{
status = freerdp_client_settings_parse_assistance_file(settings, settings->AssistanceFile);
}
/* This function will call logic that is applicable to the settings
* from command line parsing AND the rdp file parsing */
status = freerdp_client_combined_logic(settings);
return status;
}
int freerdp_client_combined_logic(rdpSettings* settings)
{
/* Moved GatewayUseSameCredentials logic outside of cmdline.c, so
* that the rdp file also triggers this functionality */
if (settings->GatewayEnabled)
{
if (settings->GatewayUseSameCredentials)
{
if (settings->Username)
settings->GatewayUsername = _strdup(settings->Username);
if (settings->Domain)
settings->GatewayDomain = _strdup(settings->Domain);
if (settings->Password)
settings->GatewayPassword = _strdup(settings->Password);
}
}
return 0;
}
int freerdp_client_settings_parse_connection_file(rdpSettings* settings, const char* filename)
{
rdpFile* file;

View File

@ -1905,21 +1905,6 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
freerdp_performance_flags_make(settings);
if (settings->GatewayEnabled)
{
if (settings->GatewayUseSameCredentials)
{
if (settings->Username)
settings->GatewayUsername = _strdup(settings->Username);
if (settings->Domain)
settings->GatewayDomain = _strdup(settings->Domain);
if (settings->Password)
settings->GatewayPassword = _strdup(settings->Password);
}
}
if (settings->SupportGraphicsPipeline)
{
settings->FastPathOutput = TRUE;