CLEANUP: protocol: remove the ->enable_all method

It's not used anymore, now the listeners are enabled from
protocol_enable_all().
This commit is contained in:
Willy Tarreau 2020-09-25 16:45:12 +02:00
parent 5b95ae6b32
commit 078e1c7102
5 changed files with 1 additions and 9 deletions

View file

@ -74,8 +74,7 @@ struct proto_fam {
/* This structure contains all information needed to easily handle a protocol.
* Its primary goal is to ease listeners maintenance. Specifically, the
* bind() primitive must be used before any fork(), and the enable_all()
* primitive must be called after the fork() to enable all fds.
* bind() primitive must be used before any fork().
*/
struct protocol {
char name[PROTO_NAME_LEN]; /* protocol name, zero-terminated */
@ -86,7 +85,6 @@ struct protocol {
int sock_prot; /* socket protocol, as passed to socket() */
void (*accept)(int fd); /* generic accept function */
int (*listen)(struct listener *l, char *errmsg, int errlen); /* start a listener */
int (*enable_all)(struct protocol *proto); /* enable all bound listeners */
int (*connect)(struct connection *, int flags); /* connect function if any, see below for flags values */
int (*drain)(int fd); /* indicates whether we can safely close the fd */
int (*pause)(struct listener *l); /* temporarily pause this listener for a soft restart */

View file

@ -68,7 +68,6 @@ static struct protocol proto_sockpair = {
.accept = &listener_accept,
.connect = &sockpair_connect_server,
.listen = sockpair_bind_listener,
.enable_all = enable_all_listeners,
.pause = NULL,
.add = sockpair_add_listener,
.listeners = LIST_HEAD_INIT(proto_sockpair.listeners),

View file

@ -59,7 +59,6 @@ static struct protocol proto_tcpv4 = {
.accept = &listener_accept,
.connect = tcp_connect_server,
.listen = tcp_bind_listener,
.enable_all = enable_all_listeners,
.pause = tcp_pause_listener,
.add = tcpv4_add_listener,
.listeners = LIST_HEAD_INIT(proto_tcpv4.listeners),
@ -79,7 +78,6 @@ static struct protocol proto_tcpv6 = {
.accept = &listener_accept,
.connect = tcp_connect_server,
.listen = tcp_bind_listener,
.enable_all = enable_all_listeners,
.pause = tcp_pause_listener,
.add = tcpv6_add_listener,
.listeners = LIST_HEAD_INIT(proto_tcpv6.listeners),

View file

@ -55,7 +55,6 @@ static struct protocol proto_udp4 = {
.accept = NULL,
.connect = NULL,
.listen = udp_bind_listener,
.enable_all = enable_all_listeners,
.pause = udp_pause_listener,
.add = udp4_add_listener,
.listeners = LIST_HEAD_INIT(proto_udp4.listeners),
@ -75,7 +74,6 @@ static struct protocol proto_udp6 = {
.accept = NULL,
.connect = NULL,
.listen = udp_bind_listener,
.enable_all = enable_all_listeners,
.pause = udp_pause_listener,
.add = udp6_add_listener,
.listeners = LIST_HEAD_INIT(proto_udp6.listeners),

View file

@ -56,7 +56,6 @@ static struct protocol proto_unix = {
.accept = &listener_accept,
.connect = &uxst_connect_server,
.listen = uxst_bind_listener,
.enable_all = enable_all_listeners,
.pause = uxst_pause_listener,
.add = uxst_add_listener,
.listeners = LIST_HEAD_INIT(proto_unix.listeners),