]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: listener: remove the unused handler field
authorWilly Tarreau <w@1wt.eu>
Mon, 28 Aug 2017 14:28:47 +0000 (16:28 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Aug 2017 05:05:08 +0000 (07:05 +0200)
Historically listeners used to have a handler depending on the upper
layer. But now it's exclusively process_stream() and nothing uses it
anymore so it can safely be removed.

include/types/listener.h
src/cfgparse.c
src/cli.c

index f309c84f0bff7d3015d2c27846330b06099489c5..064c040a943ca54bf9f410f400904ddaf8883c58 100644 (file)
@@ -190,7 +190,6 @@ struct listener {
        unsigned int maxaccept;         /* if set, max number of connections accepted at once */
        struct list proto_list;         /* list in the protocol header */
        int (*accept)(struct listener *l, int fd, struct sockaddr_storage *addr); /* upper layer's accept() */
-       struct task * (*handler)(struct task *t); /* protocol handler. It is a task */
        enum obj_type *default_target;  /* default target to use for accepted sessions or NULL */
        struct list wait_queue;         /* link element to make the listener wait for something (LI_LIMITED)  */
        unsigned int analysers;         /* bitmap of required protocol analysers */
index 850160f6ec4552c86b43aaf01e893bca24a2bd05..bdf63c2add319a4cc3c0b210376f99f4bd3d9123 100644 (file)
@@ -2075,7 +2075,6 @@ int cfg_parse_peers(const char *file, int linenum, char **args, int kwm)
                                        l->maxconn = curpeers->peers_fe->maxconn;
                                        l->backlog = curpeers->peers_fe->backlog;
                                        l->accept = session_accept_fd;
-                                       l->handler = process_stream;
                                        l->analysers |=  curpeers->peers_fe->fe_req_ana;
                                        l->default_target = curpeers->peers_fe->default_target;
                                        l->options |= LI_O_UNLIMITED; /* don't make the peers subject to global limits */
@@ -9039,7 +9038,6 @@ out_uri_auth_compat:
                        }
 
                        listener->accept = session_accept_fd;
-                       listener->handler = process_stream;
                        listener->analysers |= curproxy->fe_req_ana;
                        listener->default_target = curproxy->default_target;
 
index 77db68145cf490ffd089c2b7b647228c332e4f69..47020ffbf22ae783be0cdaba78bbf7d79fdf6ec9 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -269,7 +269,6 @@ static int stats_parse_global(char **args, int section_type, struct proxy *curpx
                        l->maxconn = global.stats_fe->maxconn;
                        l->backlog = global.stats_fe->backlog;
                        l->accept = session_accept_fd;
-                       l->handler = process_stream;
                        l->default_target = global.stats_fe->default_target;
                        l->options |= LI_O_UNLIMITED; /* don't make the peers subject to global limits */
                        l->nice = -64;  /* we want to boost priority for local stats */