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.
This commit is contained in:
Willy Tarreau 2015-05-04 18:07:56 +02:00
parent aee9314e71
commit 6bcb95da5b

View 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) {