You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
987 B

  1. From 0aa5899911bbc765ba16ce52a80fa76230781779 Mon Sep 17 00:00:00 2001
  2. From: Willy Tarreau <w@1wt.eu>
  3. Date: Mon, 4 May 2015 18:07:56 +0200
  4. Subject: [PATCH 1/2] BUG/MEDIUM: stats: properly initialize the scope before
  5. dumping stats
  6. Issuing a "show sess all" prior to a "show stat" on the CLI results in no
  7. proxy being dumped because the scope_len union member was not properly
  8. reinitialized.
  9. This fix must be backported into 1.5.
  10. (cherry picked from commit 6bcb95da5b9cb143088102b460c7bcb37c1b3d81)
  11. ---
  12. src/dumpstats.c | 2 ++
  13. 1 file changed, 2 insertions(+)
  14. diff --git a/src/dumpstats.c b/src/dumpstats.c
  15. index b616478..ca084ac 100644
  16. --- a/src/dumpstats.c
  17. +++ b/src/dumpstats.c
  18. @@ -1109,6 +1109,8 @@ static int stats_sock_parse_request(struct stream_interface *si, char *line)
  19. arg++;
  20. }
  21. + appctx->ctx.stats.scope_str = 0;
  22. + appctx->ctx.stats.scope_len = 0;
  23. appctx->ctx.stats.flags = 0;
  24. if (strcmp(args[0], "show") == 0) {
  25. if (strcmp(args[1], "stat") == 0) {
  26. --
  27. 2.0.5