Merge pull request #2262 from bmiklautz/misc_fixes

Misc fixes
This commit is contained in:
Marc-André Moreau 2014-12-11 08:27:30 -05:00
commit 77982c6271
2 changed files with 14 additions and 8 deletions

View File

@ -913,18 +913,22 @@ BOOL xf_pre_connect(freerdp* instance)
freerdp_client_load_addins(channels, instance->settings);
freerdp_channels_pre_connect(channels, instance);
if (!settings->Username)
{
char *login_name = getlogin();
if (login_name)
{
settings->Username = _strdup(login_name);
WLog_INFO(TAG, "No user name set. - Using login name: %s", settings->Username);
}
}
if (settings->AuthenticationOnly)
{
/* Check --authonly has a username and password. */
if (!settings->Username)
{
WLog_INFO(TAG, "--authonly, but no -u username. Please provide one.");
return FALSE;
}
/* Check +auth-only has a username and password. */
if (!settings->Password)
{
WLog_INFO(TAG, "--authonly, but no -p password. Please provide one.");
WLog_INFO(TAG, "auth-only, but no password set. Please provide one.");
return FALSE;
}

View File

@ -230,6 +230,8 @@ BOOL nego_tcp_connect(rdpNego* nego)
if (nego->GatewayBypassLocal)
{
/* Attempt a direct connection first, and then fallback to using the gateway */
WLog_INFO(TAG, "Detecting if host can be reached locally. - This might take some time.");
WLog_INFO(TAG, "To disable auto detection use /gateway-usage-method:direct");
transport_set_gateway_enabled(nego->transport, FALSE);
nego->tcp_connected = transport_connect(nego->transport, nego->hostname, nego->port, 1);
}