]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mworker/cli: does no try to dump the startup-logs w/o USE_SHM_OPEN
authorWilliam Lallemand <wlallemand@haproxy.org>
Fri, 21 Oct 2022 12:03:29 +0000 (14:03 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 21 Oct 2022 12:03:29 +0000 (14:03 +0200)
When haproxy is compiled without USE_SHM_OPEN, does not try to dump the
startup-logs in the "reload" output, because it won't show anything
interesting.

src/mworker.c

index 2d5b6b8f94ab74d475978a914bd41d237f6fc745..fc4dee104c57c23f745549b2ea074598fd8c2b57 100644 (file)
@@ -681,7 +681,7 @@ static int cli_io_handler_show_loadstatus(struct appctx *appctx)
        } else if (strcmp(env, "1") == 0) {
                chunk_printf(&trash, "Success=1\n");
        }
-
+#ifdef USE_SHM_OPEN
        if (startup_logs && b_data(&startup_logs->buf) > 1)
                chunk_appendf(&trash, "--\n");
 
@@ -693,6 +693,10 @@ static int cli_io_handler_show_loadstatus(struct appctx *appctx)
                ring_attach_cli(startup_logs, appctx, 0);
                return 0;
        }
+#else
+       if (applet_putchk(appctx, &trash) == -1)
+               return 0;
+#endif
        return 1;
 }