From: Willy Tarreau Date: Thu, 17 Jun 2021 05:22:27 +0000 (+0200) Subject: BUG/MINOR: stats: make "show stat typed desc" work again X-Git-Tag: v2.3.11~34 X-Git-Url: http://git.haproxy.org/?a=commitdiff_plain;h=917f95027d79379f9acff0bb4797144a818fe355;p=haproxy-2.3.git BUG/MINOR: stats: make "show stat typed desc" work again 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. (cherry picked from commit fc8e438637aa926e681c8b7f3fa061021dfb2201) Signed-off-by: Willy Tarreau (cherry picked from commit b653d2f152a3ab837fea5c3b559e89133031e791) Signed-off-by: Willy Tarreau --- diff --git a/src/stats.c b/src/stats.c index 406b24e..6426d94 100644 --- a/src/stats.c +++ b/src/stats.c @@ -621,8 +621,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; }