Added /buildconfig command line for shadow.
authorArmin Novak <armin.novak@thincast.com>
Fri, 4 Oct 2019 13:02:08 +0000 (15:02 +0200)
committerArmin Novak <armin.novak@thincast.com>
Fri, 4 Oct 2019 14:19:23 +0000 (16:19 +0200)
server/shadow/shadow.c
server/shadow/shadow_server.c

index 4daf55e..0e869d9 100644 (file)
@@ -72,7 +72,6 @@ int main(int argc, char** argv)
        if ((status = shadow_server_parse_command_line(server, argc, argv)) < 0)
        {
                shadow_server_command_line_status_print(server, argc, argv, status);
-               WLog_ERR(TAG, "Problem parsing the command line.");
                goto fail_parse_command_line;
        }
 
index 619a81a..3d1566a 100644 (file)
@@ -61,6 +61,7 @@ static COMMAND_LINE_ARGUMENT_A shadow_args[] =
        { "sec-ext", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "nla extended protocol security" },
        { "sam-file", COMMAND_LINE_VALUE_REQUIRED, "<file>", NULL, NULL, -1, NULL, "NTLM SAM file for NLA authentication" },
        { "version", COMMAND_LINE_VALUE_FLAG | COMMAND_LINE_PRINT_VERSION, NULL, NULL, NULL, -1, NULL, "Print version" },
+       { "buildconfig", COMMAND_LINE_VALUE_FLAG | COMMAND_LINE_PRINT_BUILDCONFIG, NULL, NULL, NULL, -1, NULL, "Print the build configuration" },
        { "help", COMMAND_LINE_VALUE_FLAG | COMMAND_LINE_PRINT_HELP, NULL, NULL, NULL, -1, "?", "Print help" },
        { NULL, 0, NULL, NULL, NULL, -1, NULL, NULL }
 };
@@ -145,6 +146,11 @@ int shadow_server_command_line_status_print(rdpShadowServer* server, int argc, c
                WLog_INFO(TAG, "FreeRDP version %s (git %s)", FREERDP_VERSION_FULL, GIT_REVISION);
                return COMMAND_LINE_STATUS_PRINT_VERSION;
        }
+       else if (status == COMMAND_LINE_STATUS_PRINT_BUILDCONFIG)
+       {
+               WLog_INFO(TAG, "%s", freerdp_get_build_config());
+               return COMMAND_LINE_STATUS_PRINT_BUILDCONFIG;
+       }
        else if (status == COMMAND_LINE_STATUS_PRINT)
        {
                return COMMAND_LINE_STATUS_PRINT;