]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: proxy: replace proxy->state with proxy->disabled
authorWilly Tarreau <w@1wt.eu>
Thu, 24 Sep 2020 06:39:22 +0000 (08:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2020 09:27:30 +0000 (11:27 +0200)
commitc3914d4fffd03f6af3b158b05b15d5abe6d9f78a
tree8d2141586cb74a30da0ed4ea59f0c14915bc1f4b
parent1ad64acf6cfb4d804cf5da2581382995cec8b649
MEDIUM: proxy: replace proxy->state with proxy->disabled

The remaining proxy states were only used to distinguish an enabled
proxy from a disabled one. Due to the initialization order, both
PR_STNEW and PR_STREADY were equivalent after startup, and they
would only differ from PR_STSTOPPED when the proxy is disabled or
shutdown (which is effectively another way to disable it).

Now we just have a "disabled" field which allows to distinguish them.
It's becoming obvious that start_proxies() is only used to print a
greeting message now, that we'd rather get rid of. Probably that
zombify_proxy() and stop_proxy() should be merged once their
differences move to the right place.
18 files changed:
contrib/prometheus-exporter/service-prometheus.c
include/haproxy/backend.h
include/haproxy/proxy-t.h
src/cfgparse-listen.c
src/cfgparse.c
src/check.c
src/cli.c
src/extcheck.c
src/haproxy.c
src/mux_fcgi.c
src/mux_h1.c
src/mux_h2.c
src/mworker.c
src/proxy.c
src/server.c
src/stats.c
src/stick_table.c
src/stream.c