From 6bcb95da5b9cb143088102b460c7bcb37c1b3d81 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 4 May 2015 18:07:56 +0200 Subject: [PATCH] BUG/MEDIUM: stats: properly initialize the scope before dumping stats 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dumpstats.c b/src/dumpstats.c index b8e822ff5..35391ae0d 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -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) {