]> git.kaiwu.me - haproxy.git/commit
MEDIUM: counters: mostly revert da813ae4d7cb77137ed
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 14 Jan 2026 10:37:49 +0000 (11:37 +0100)
committerOlivier Houchard <ohouchard@haproxy.com>
Wed, 14 Jan 2026 11:39:14 +0000 (12:39 +0100)
commit7f4b053b26429754df3094001e375b81cee6895d
treedf2a4afb4fe9692361e8c2caa9570c5c943133a4
parent7aa839296de9e6d330c6a952ae2197aa49db1c66
MEDIUM: counters: mostly revert da813ae4d7cb77137ed

Contrarily to what was previously believed, there are corner cases where
the counters may not be allocated, and we may want to make them optional
at a later date, so we have to check if those counters are there.
However, just checking that shared.tg is non-NULL is enough, we can then
assume that shared.tg[tgid - 1] has properly been allocated too.
Also modify the various COUNTER_SHARED_* macros to make sure they check
for that too.
include/haproxy/backend.h
include/haproxy/counters.h
include/haproxy/proxy.h
include/haproxy/server.h
src/backend.c
src/cache.c
src/check.c
src/server.c