]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: protocol: always initialize the receivers list on registration
authorWilly Tarreau <w@1wt.eu>
Fri, 9 Aug 2024 19:32:29 +0000 (21:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 21 Aug 2024 15:37:46 +0000 (17:37 +0200)
commit1cb3b0b745fc6288da33fc6b01cb6ae154863793
tree2e5a92ebf4514d4a89153b49e2aa50c4547ba0f5
parent034974106fc3e15a9eaf243dfbb7c94fd86caa83
MINOR: protocol: always initialize the receivers list on registration

Till now, protocols were required to self-initialize their receivers
list head, which is not very convenient, and is quite error prone.
Indeed, it's too easy to copy-paste a protocol definition and forget
to update the .receivers field to point to itself, resulting in mixed
lists. Let's just do that in protocol_register(). And while we're at
it, let's also zero the nb_receivers entry that works with it, so that
the protocol definition isn't required to pre-initialize stuff related
to internal book-keeping.
src/protocol.c