]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: listener: now use a generic add_listener() function
authorWilly Tarreau <w@1wt.eu>
Fri, 4 Dec 2020 14:03:36 +0000 (15:03 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 4 Dec 2020 14:08:00 +0000 (15:08 +0100)
commitd1f250f87b8850f24456e62140509e612f8b3415
tree64a56a7d9f67df60f8e4c66b69c840a3d7c00801
parent07400c56bb0ab81cfd2e295c790b699839fea0a3
MINOR: listener: now use a generic add_listener() function

With the removal of the family-specific port setting, all protocol had
exactly the same implementation of ->add(). A generic one was created
with the name "default_add_listener" so that all other ones can now be
removed. The API was slightly adjusted so that the protocol and the
listener are passed instead of the listener and the port.

Note that all protocols continue to provide this ->add() method instead
of routinely calling default_add_listener() from create_listeners(). This
makes sure that any non-standard protocol will still be able to intercept
the listener addition if needed.

This could be backported to 2.3 along with the few previous patches on
listners as a pure code cleanup.
include/haproxy/listener.h
include/haproxy/protocol-t.h
src/listener.c
src/proto_sockpair.c
src/proto_tcp.c
src/proto_udp.c
src/proto_uxst.c