mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-10 00:57:02 +02:00
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!
This commit is contained in:
parent
775e00158a
commit
1accacbcc3
@ -44,8 +44,6 @@ void soft_stop(void);
|
|||||||
int pause_proxy(struct proxy *p);
|
int pause_proxy(struct proxy *p);
|
||||||
int resume_proxy(struct proxy *p);
|
int resume_proxy(struct proxy *p);
|
||||||
void stop_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);
|
int stream_set_backend(struct stream *s, struct proxy *be);
|
||||||
|
|
||||||
const char *proxy_cap_str(int cap);
|
const char *proxy_cap_str(int cap);
|
||||||
|
67
src/proxy.c
67
src/proxy.c
@ -1371,73 +1371,6 @@ int resume_proxy(struct proxy *p)
|
|||||||
return 1;
|
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
|
/* Set current stream's backend to <be>. Nothing is done if the
|
||||||
* stream already had a backend assigned, which is indicated by
|
* stream already had a backend assigned, which is indicated by
|
||||||
* s->flags & SF_BE_ASSIGNED.
|
* s->flags & SF_BE_ASSIGNED.
|
||||||
|
Loading…
Reference in New Issue
Block a user