From 37f29ebcce04aa92dd450340d0537f2143d4b8cc Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Sat, 16 Mar 2013 00:33:58 +0100 Subject: [PATCH] Fixed command line with .rdp file Now clients can be called with a .rdp file again like xfreerdp test.rdp --- client/common/cmdline.c | 2 +- client/common/compatibility.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client/common/cmdline.c b/client/common/cmdline.c index ae05f6b77..28ab422aa 100644 --- a/client/common/cmdline.c +++ b/client/common/cmdline.c @@ -986,7 +986,7 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin arg = CommandLineFindArgumentA(args, "v"); - if (!(arg->Flags & COMMAND_LINE_VALUE_PRESENT)) + if (!settings->ConnectionFile && !(arg->Flags & COMMAND_LINE_VALUE_PRESENT)) { printf("error: server hostname was not specified with /v:[:port]\n"); return COMMAND_LINE_ERROR_MISSING_ARGUMENT; diff --git a/client/common/compatibility.c b/client/common/compatibility.c index 3faf68aa6..f3dc49df3 100644 --- a/client/common/compatibility.c +++ b/client/common/compatibility.c @@ -186,7 +186,10 @@ int freerdp_client_old_command_line_pre_filter(void* context, int index, int arg { return -1; } - + if (_stricmp(&(argv[index])[strlen(argv[index])- 4], ".rdp") == 0) + { + return -1; + } freerdp_client_old_parse_hostname((char*) argv[index], &settings->ServerHostname, &settings->ServerPort); } else