]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: stats: fix show stats field ctx for servers
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 2 Feb 2023 17:13:30 +0000 (18:13 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 6 Feb 2023 06:53:03 +0000 (07:53 +0100)
In ("MINOR: stats: introduce stats field ctx"), we forgot
to apply the patch to servers.

This prevents "BUG/MINOR: stats: fix show stat json buffer limitation"
from working with servers dump.

We're adding the missing part related to servers dump.

This commit should be backported with the aforementioned commits.

src/stats.c

index 5be66d4840a0680119c4bf37727f5ead1590440f..7bd42ed96143cbe91d403a8da5c3ac439e8cc365 100644 (file)
@@ -3311,7 +3311,10 @@ more:
                        if (stats_dump_sv_stats(sc, px, sv)) {
                                if (!stats_putchk(rep, htx))
                                        goto full;
+                               if (ctx->field)
+                                       goto more;
                        }
+                       current_field = 0;
                } /* for sv */
 
                ctx->px_st = STAT_PX_ST_BE;