diff options
author | Willy Tarreau <w@1wt.eu> | 2023-05-17 08:43:15 +0200 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2023-05-17 09:33:54 +0200 |
commit | 52fd87995361d68336b20ec931472bac2cb706ba (patch) | |
tree | 369cf51493d0337c033bdfa6ee0874da3b8a112b | |
parent | cb76030356b5da5a5a5b253a5d7c9742266071d5 (diff) | |
download | haproxy-52fd87995361d68336b20ec931472bac2cb706ba.tar.gz |
CLEANUP: stats: update the trash chunk where it's used
When integrating the number of warnings in "show info" in 2.8 with commit
3c4a297d2 ("MINOR: stats: report the total number of warnings issued"),
the update of the trash buffer used by the Tainted flag got displaced
lower. There's no harm for now util someone adds a new metric requiring
a call to chunk_newstr() and gets both values merged. Let's move the
call to its location now.
-rw-r--r-- | src/stats.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stats.c b/src/stats.c index c06fce3d3..48eb532e0 100644 --- a/src/stats.c +++ b/src/stats.c @@ -4745,9 +4745,9 @@ int stats_fill_info(struct field *info, int len, uint flags) info[INF_CUM_LOG_MSGS] = mkf_u32(FN_COUNTER, cum_log_messages); info[INF_TAINTED] = mkf_str(FO_STATUS, chunk_newstr(out)); + chunk_appendf(out, "%#x", get_tainted()); info[INF_WARNINGS] = mkf_u32(FN_COUNTER, HA_ATOMIC_LOAD(&tot_warnings)); info[INF_MAXCONN_REACHED] = mkf_u32(FN_COUNTER, HA_ATOMIC_LOAD(&maxconn_reached)); - chunk_appendf(out, "%#x", get_tainted()); return 1; } |