diff options
author | Willy Tarreau <w@1wt.eu> | 2020-09-25 16:30:22 +0200 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2020-10-07 18:45:03 +0200 |
commit | 19f0bd90eec9e13798e3f3d064ee1172b22fce58 (patch) | |
tree | 7327ab020a3e9dff6d1b5cd154588593e3f92eae | |
parent | 93d4697c21abe6e7fe9f4bef004c71cf3a53c825 (diff) | |
download | haproxy-19f0bd90eec9e13798e3f3d064ee1172b22fce58.tar.gz |
CLEANUP: protocol: remove the ->disable_all method
This one has never been used, is only referenced by proto_uxst and
proto_sockpair, and it's not even certain it works at all. Let's
get rid of it.
-rw-r--r-- | include/haproxy/protocol-t.h | 1 | ||||
-rw-r--r-- | src/proto_sockpair.c | 1 | ||||
-rw-r--r-- | src/proto_uxst.c | 1 | ||||
-rw-r--r-- | src/protocol.c | 20 |
4 files changed, 0 insertions, 23 deletions
diff --git a/include/haproxy/protocol-t.h b/include/haproxy/protocol-t.h index 2c5b66227..9f790152a 100644 --- a/include/haproxy/protocol-t.h +++ b/include/haproxy/protocol-t.h @@ -87,7 +87,6 @@ struct protocol { 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 (*disable_all)(struct protocol *proto); /* disable 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 */ diff --git a/src/proto_sockpair.c b/src/proto_sockpair.c index eb7ef8697..53a44792d 100644 --- a/src/proto_sockpair.c +++ b/src/proto_sockpair.c @@ -69,7 +69,6 @@ static struct protocol proto_sockpair = { .connect = &sockpair_connect_server, .listen = sockpair_bind_listener, .enable_all = enable_all_listeners, - .disable_all = disable_all_listeners, .pause = NULL, .add = sockpair_add_listener, .listeners = LIST_HEAD_INIT(proto_sockpair.listeners), diff --git a/src/proto_uxst.c b/src/proto_uxst.c index c477d193d..2b1b0c3c9 100644 --- a/src/proto_uxst.c +++ b/src/proto_uxst.c @@ -57,7 +57,6 @@ static struct protocol proto_unix = { .connect = &uxst_connect_server, .listen = uxst_bind_listener, .enable_all = enable_all_listeners, - .disable_all = disable_all_listeners, .pause = uxst_pause_listener, .add = uxst_add_listener, .listeners = LIST_HEAD_INIT(proto_unix.listeners), diff --git a/src/protocol.c b/src/protocol.c index 54b708332..c248929b3 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -215,26 +215,6 @@ int protocol_enable_all(void) return err; } -/* disables all listeners of all registered protocols. This may be used before - * a fork() to avoid duplicating poll lists. Returns a composition of ERR_NONE, - * ERR_RETRYABLE, ERR_FATAL. - */ -int protocol_disable_all(void) -{ - struct protocol *proto; - int err; - - err = 0; - HA_SPIN_LOCK(PROTO_LOCK, &proto_lock); - list_for_each_entry(proto, &protocols, list) { - if (proto->disable_all) { - err |= proto->disable_all(proto); - } - } - HA_SPIN_UNLOCK(PROTO_LOCK, &proto_lock); - return err; -} - /* * Local variables: * c-indent-level: 8 |