]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MEDIUM] proxy: add a PAUSED state to listeners and move socket tricks out of proxy.c
authorWilly Tarreau <w@1wt.eu>
Sun, 24 Jul 2011 16:28:10 +0000 (18:28 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 24 Jul 2011 17:09:37 +0000 (19:09 +0200)
commitbe58c38264b618e2a116b0d0c0f9f7cb2c86933b
tree99a1b3e61fdb71d2695e9cf060dc9966b4d8e26c
parent100298749bb45789fd1d7bc8c1c7f3ac3f6d504d
[MEDIUM] proxy: add a PAUSED state to listeners and move socket tricks out of proxy.c

Managing listeners state is difficult because they have their own state
and can at the same time have theirs dictated by their proxy. The pause
is not done properly, as the proxy code is fiddling with sockets. By
introducing new functions such as pause_listener()/resume_listener(), we
make it a bit more obvious how/when they're supposed to be used. The
listen_proxies() function was also renamed to resume_proxies() since
it's only used for pause/resume.

This patch is the first in a series aiming at getting rid of the maintain_proxies
mess. In the end, proxies should not call enable_listener()/disable_listener()
anymore.
include/proto/protocols.h
include/proto/proxy.h
include/types/protocols.h
src/haproxy.c
src/proto_uxst.c
src/protocols.c
src/proxy.c