Skip to content

Commit

Permalink
Fixed typo and invalid domain name.
Browse files Browse the repository at this point in the history
  • Loading branch information
akallabeth committed Jun 18, 2015
1 parent e563b2b commit c3e368b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions client/common/cmdline.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ int freerdp_parse_username(char* username, char** user, char** domain)
int length = 0;

p = strchr(username, '\\');
p = strrchr(username, '@');
u = strrchr(username, '@');

*user = NULL;
*domain = NULL;
Expand Down Expand Up @@ -836,10 +836,7 @@ int freerdp_parse_username(char* username, char** user, char** domain)
* otherwise set the domain to an empty string.
* NOTE: Domain NULL will result in undefined behavior.
*/
if (!u)
*domain = _strdup("TARGET");
else
*domain = _strdup("\0");
*domain = _strdup("\0");

if (!*domain)
{
Expand Down Expand Up @@ -2052,7 +2049,7 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
if (!settings->GatewayDomain && gwUser)
{
freerdp_parse_username(gwUser, &settings->GatewayUsername,
&settings->GatewayDomain);
&settings->GatewayDomain);
free(gwUser);
}
else
Expand Down

0 comments on commit c3e368b

Please sign in to comment.