xfreerdp: fail differently if no hostname is given

This commit is contained in:
Marc-André Moreau 2013-04-22 08:33:41 -04:00
parent 9efb3e7f57
commit 914ac31cbf
2 changed files with 10 additions and 2 deletions

View File

@ -1428,6 +1428,14 @@ int freerdp_client_global_uninit()
int freerdp_client_start(xfInfo* xfi)
{
rdpSettings* settings = xfi->settings;
if (!settings->ServerHostname)
{
fprintf(stderr, "error: server hostname was not specified with /v:<server>[:port]\n");
return -1;
}
xfi->thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) xf_thread, (void*) xfi->instance, 0, NULL);
return 0;

View File

@ -992,8 +992,8 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
if (!settings->ConnectionFile && !(arg->Flags & COMMAND_LINE_VALUE_PRESENT))
{
fprintf(stderr, "error: server hostname was not specified with /v:<server>[:port]\n");
return COMMAND_LINE_ERROR_MISSING_ARGUMENT;
//fprintf(stderr, "error: server hostname was not specified with /v:<server>[:port]\n");
//return COMMAND_LINE_ERROR_MISSING_ARGUMENT;
}
arg = args;