]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: protocol: remove the ->enable_all method
authorWilly Tarreau <w@1wt.eu>
Fri, 25 Sep 2020 14:45:12 +0000 (16:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2020 09:27:30 +0000 (11:27 +0200)
It's not used anymore, now the listeners are enabled from
protocol_enable_all().

include/haproxy/protocol-t.h
src/proto_sockpair.c
src/proto_tcp.c
src/proto_udp.c
src/proto_uxst.c

index 9f790152a17bcd595f259f72728190f2d7381e55..bf66dc25601dd38810d45d8d838bc867c8b58e82 100644 (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 */
index 53a44792d9168545de09052e32cbfc78c582ff1e..c77308f44508bd764b6527cd54b3c57d4614e42f 100644 (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),
index b9bc97e42555ded89346a4d9e9251a4583479759..4e6d36a4eb5dba2cb210ff984725e9fae83a0799 100644 (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),
index af75cc977c5f474757e33f471f509a0fb6d6d0e7..aa2416f1200b23f1099b2fca99a7f2e8b4eb380f 100644 (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),
index 2b1b0c3c946317d6905430e8d8d6c478d3511a3b..96d96b3ce17d375c28acddd5b4e740a62a788f3d 100644 (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),