From: Willy Tarreau Date: Thu, 24 Sep 2020 14:42:00 +0000 (+0200) Subject: CLEANUP: proxy: remove the now unused pause_proxies() and resume_proxies() X-Git-Tag: v2.3-dev6~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1accacbcc31212d1ac742cda1f9d8429398a21ab;p=thirdparty%2Fhaproxy.git CLEANUP: proxy: remove the now unused pause_proxies() and resume_proxies() They're not used anymore, delete them before someone thinks about using them again! --- diff --git a/include/haproxy/proxy.h b/include/haproxy/proxy.h index 043ffe6d79..a33ed26ee4 100644 --- a/include/haproxy/proxy.h +++ b/include/haproxy/proxy.h @@ -44,8 +44,6 @@ void soft_stop(void); int pause_proxy(struct proxy *p); int resume_proxy(struct proxy *p); void stop_proxy(struct proxy *p); -void pause_proxies(void); -void resume_proxies(void); int stream_set_backend(struct stream *s, struct proxy *be); const char *proxy_cap_str(int cap); diff --git a/src/proxy.c b/src/proxy.c index 7d256c6668..7b000bb239 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -1371,73 +1371,6 @@ int resume_proxy(struct proxy *p) return 1; } -/* - * This function temporarily disables listening so that another new instance - * can start listening. It is designed to be called upon reception of a - * SIGTTOU, after which either a SIGUSR1 can be sent to completely stop - * the proxy, or a SIGTTIN can be sent to listen again. - */ -void pause_proxies(void) -{ - int err; - struct proxy *p; - struct peers *prs; - - err = 0; - p = proxies_list; - tv_update_date(0,1); /* else, the old time before select will be used */ - while (p) { - err |= !pause_proxy(p); - p = p->next; - } - - prs = cfg_peers; - while (prs) { - if (prs->peers_fe) - err |= !pause_proxy(prs->peers_fe); - prs = prs->next; - } - - if (err) { - ha_warning("Some proxies refused to pause, performing soft stop now.\n"); - send_log(p, LOG_WARNING, "Some proxies refused to pause, performing soft stop now.\n"); - soft_stop(); - } -} - - -/* - * This function reactivates listening. This can be used after a call to - * sig_pause(), for example when a new instance has failed starting up. - * It is designed to be called upon reception of a SIGTTIN. - */ -void resume_proxies(void) -{ - int err; - struct proxy *p; - struct peers *prs; - - err = 0; - p = proxies_list; - tv_update_date(0,1); /* else, the old time before select will be used */ - while (p) { - err |= !resume_proxy(p); - p = p->next; - } - - prs = cfg_peers; - while (prs) { - if (prs->peers_fe) - err |= !resume_proxy(prs->peers_fe); - prs = prs->next; - } - - if (err) { - ha_warning("Some proxies refused to resume, a restart is probably needed to resume safe operations.\n"); - send_log(p, LOG_WARNING, "Some proxies refused to resume, a restart is probably needed to resume safe operations.\n"); - } -} - /* Set current stream's backend to . Nothing is done if the * stream already had a backend assigned, which is indicated by * s->flags & SF_BE_ASSIGNED.