]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stconn: report that a buffer allocation succeeded
authorWilly Tarreau <w@1wt.eu>
Tue, 7 May 2024 15:11:14 +0000 (17:11 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 May 2024 15:18:13 +0000 (17:18 +0200)
commit7aff64518c2a678060595fc23bf64f8ca4ce16e8
tree5c945bd69848c0cd692a29b8c622f27478d815f5
parentd1eb48a12b466984532c10091e04f4da64eaa9cd
MINOR: stconn: report that a buffer allocation succeeded

We used to have two states for the channel's input buffer used by the SC,
NEED_BUFF or not, flipped by sc_need_buff() and sc_have_buff(). We want to
have a 3rd state, indicating that we've just got a desired buffer. Let's
add an HAVE_BUFF flag that is set by sc_have_buff() and that is cleared by
sc_used_buff(). This way by looking at HAVE_BUFF we know that we're coming
back from the allocation callback and that the offered buffer has not yet
been used.
include/haproxy/sc_strm.h
include/haproxy/stconn-t.h
include/haproxy/stconn.h