]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: proxy: remove the now unused pause_proxies() and resume_proxies()
authorWilly Tarreau <w@1wt.eu>
Thu, 24 Sep 2020 14:42:00 +0000 (16:42 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2020 09:27:30 +0000 (11:27 +0200)
They're not used anymore, delete them before someone thinks about using
them again!

include/haproxy/proxy.h
src/proxy.c

index 043ffe6d79148cd31ad183664480738ed13f64ab..a33ed26ee440636436351d1ec04623134ee984b3 100644 (file)
@@ -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);
index 7d256c6668313589605d9c7880f048dc144843c3..7b000bb239f44ba45bcdf410dafcec6edba84784 100644 (file)
@@ -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 <be>. Nothing is done if the
  * stream already had a backend assigned, which is indicated by
  * s->flags & SF_BE_ASSIGNED.