]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: stats: properly initialize the scope before dumping stats
authorWilly Tarreau <w@1wt.eu>
Mon, 4 May 2015 16:07:56 +0000 (18:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 4 May 2015 16:07:56 +0000 (18:07 +0200)
Issuing a "show sess all" prior to a "show stat" on the CLI results in no
proxy being dumped because the scope_len union member was not properly
reinitialized.

This fix must be backported into 1.5.

src/dumpstats.c

index b8e822ff52332c6a8a0e3af395c1b8ca7132b2a3..35391ae0df7f1edad9304f2333af66a038f2dcb6 100644 (file)
@@ -1090,6 +1090,8 @@ static int stats_sock_parse_request(struct stream_interface *si, char *line)
                arg++;
        }
 
+       appctx->ctx.stats.scope_str = 0;
+       appctx->ctx.stats.scope_len = 0;
        appctx->ctx.stats.flags = 0;
        if (strcmp(args[0], "show") == 0) {
                if (strcmp(args[1], "stat") == 0) {