]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: ring: allow to reduce a ring size
authorWilly Tarreau <w@1wt.eu>
Thu, 14 Mar 2024 05:48:41 +0000 (06:48 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Mar 2024 17:34:19 +0000 (17:34 +0000)
commit4e6de42b27a60f6bf3d747237a3573ce7c3a45e1
tree02f8654bde7b8821b761d5b85dc07d111b06ceb9
parent0fa05ce171cd28c594762fe7b1b5f10d2b853068
MINOR: ring: allow to reduce a ring size

In ring_resize() we used to check if the new ring was at least as large
as the previous one before resizing it, but what counts is that it's as
large as the previous one's contents. Initially it was thought this
would not really matter, but given that rings are initially created as
BUFSIZE, it's currently not possible to shrink them for debugging
purposes. Now with this change it is.
src/ring.c
src/sink.c