]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: stats: make "show stat typed desc" work again
authorWilly Tarreau <w@1wt.eu>
Thu, 17 Jun 2021 05:22:27 +0000 (07:22 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 17 Jun 2021 05:25:22 +0000 (07:25 +0200)
As part of the changes to support per-module stats data in 2.3-dev6
with commit ee63d4bd6 ("MEDIUM: stats: integrate static proxies stats
in new stats"), a small change resulted in the description field to
be replaced by the name field, making it pointless. Let's fix this
back.

This should fix issue #1291. Thanks to Nick Ramirez for reporting this
issue.

This patch can be backported to 2.3.

src/stats.c

index a35ef0d893cba9500b8e0fbb654ac0824aa6bb9f..0b743d18997a858d8916841d70fd33efac6c337a 100644 (file)
@@ -637,8 +637,8 @@ static int stats_dump_fields_typed(struct buffer *out,
                if (!stats_emit_typed_data_field(out, &stats[field]))
                        return 0;
 
-               if (flags & STAT_SHOW_FDESC
-                   && !chunk_appendf(out, ":\"%s\"", stat_f[domain][field].name)) {
+               if (flags & STAT_SHOW_FDESC &&
+                   !chunk_appendf(out, ":\"%s\"", stat_f[domain][field].desc)) {
                        return 0;
                }