]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: listeners: remove unused timeout
authorWilly Tarreau <w@1wt.eu>
Fri, 13 Mar 2015 15:25:15 +0000 (16:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 13 Mar 2015 15:25:15 +0000 (16:25 +0100)
Listerner->timeout is a vestigal thing going back to 2007 or so. It
used to only be used by stats and peers frontends to hold a pointer
to the proxy's client timeout. Now that we use regular frontends, we
don't use it anymore.

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

index 2f5d566ecaf0015517e9f731675ea48c4fc34eb9..ad2fcca1aaa1aeab61ec6bd320ecd4dedf6c3590 100644 (file)
@@ -172,7 +172,6 @@ struct listener {
        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 */
-       int  *timeout;                  /* pointer to client-side timeout */
        struct proxy *frontend;         /* the frontend this listener belongs to, 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 cdb65035b9276224cd76df21b3b9ff5e92383285..5fe3ffb1eb475f126d82d770208280285efd56e9 100644 (file)
@@ -1884,7 +1884,6 @@ int cfg_parse_peers(const char *file, int linenum, char **args, int kwm)
                                        l->maxaccept = 1;
                                        l->maxconn = ((struct proxy *)curpeers->peers_fe)->maxconn;
                                        l->backlog = ((struct proxy *)curpeers->peers_fe)->backlog;
-                                       l->timeout = &((struct proxy *)curpeers->peers_fe)->timeout.client;
                                        l->accept = session_accept;
                                        l->handler = process_session;
                                        l->analysers |=  ((struct proxy *)curpeers->peers_fe)->fe_req_ana;
@@ -7708,7 +7707,6 @@ out_uri_auth_compat:
                                listener->maxaccept = (listener->maxaccept + nbproc - 1) / nbproc;
                        }
 
-                       listener->timeout = &curproxy->timeout.client;
                        listener->accept = session_accept;
                        listener->handler = process_session;
                        listener->analysers |= curproxy->fe_req_ana;
index 8a9da5a241e3dfbadbb0e500c436cc62d74f4c5e..ba72d713b1ac9e39a3d4059d4d0aa83c5f892e91 100644 (file)
@@ -337,7 +337,6 @@ static int stats_parse_global(char **args, int section_type, struct proxy *curpx
                list_for_each_entry(l, &bind_conf->listeners, by_bind) {
                        l->maxconn = global.stats_fe->maxconn;
                        l->backlog = global.stats_fe->backlog;
-                       l->timeout = &global.stats_fe->timeout.client;
                        l->accept = session_accept;
                        l->handler = process_session;
                        l->options |= LI_O_UNLIMITED; /* don't make the peers subject to global limits */