]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: cache: Fix loop on cache entries in "show cache"
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 23 Nov 2021 15:03:05 +0000 (16:03 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 23 Nov 2021 15:15:02 +0000 (16:15 +0100)
commit27f88a9059d0e343d82a0319b622e0f4248b0bb8
treece6dbc1d879bcede21ffd231d41dfa39127b8648
parent73dec76e853a03b9f06364e47c1266e81294d1d1
BUG/MINOR: cache: Fix loop on cache entries in "show cache"

A regression was introduced in the commit da91842b6 ("BUG/MEDIUM: cache/cli:
make "show cache" thread-safe"). When cli_io_handler_show_cache() is called,
only one node is retrieved and is used to fill the output buffer in loop.
Once set, the "node" variable is never renewed. At the end, all nodes are
dumped but each one is duplicated several time into the output buffer.

This patch must be backported everywhere the above commit is. It means only
to 2.5 and 2.4.
src/cache.c