summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2020-09-24 16:42:00 +0200
committerWilly Tarreau <w@1wt.eu>2020-10-07 18:45:03 +0200
commit349102ae75f44377f23595d0afd27841e87f5b46 (patch)
tree629c82f4a7203ce53ed6bbb3d8f67670b5ab2f65
parent69c7cf7a6a82be1986cb7966fba4257ab7600319 (diff)
downloadhaproxy-349102ae75f44377f23595d0afd27841e87f5b46.tar.gz
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!
-rw-r--r--include/haproxy/proxy.h2
-rw-r--r--src/proxy.c67
2 files changed, 0 insertions, 69 deletions
diff --git a/include/haproxy/proxy.h b/include/haproxy/proxy.h
index 043ffe6d7..a33ed26ee 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 7d256c666..7b000bb23 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 <be>. Nothing is done if the
* stream already had a backend assigned, which is indicated by
* s->flags & SF_BE_ASSIGNED.