summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2020-09-25 16:40:18 +0200
committerWilly Tarreau <w@1wt.eu>2020-10-07 18:45:03 +0200
commit8b9cbc733b0d7fe2bb666698a2b4c9f8f2a21875 (patch)
treec92f64cdfcf3c545a64ba7352326641ebba17224
parent13ee865befdfccf3049408fb72f61ba95f10624f (diff)
downloadhaproxy-8b9cbc733b0d7fe2bb666698a2b4c9f8f2a21875.tar.gz
MINOR: listeners: export enable_listener()
we'll soon call it from outside.
-rw-r--r--include/haproxy/listener.h8
-rw-r--r--src/listener.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/include/haproxy/listener.h b/include/haproxy/listener.h
index e2574e678..ccd9a4710 100644
--- a/include/haproxy/listener.h
+++ b/include/haproxy/listener.h
@@ -48,6 +48,14 @@ int pause_listener(struct listener *l);
*/
int resume_listener(struct listener *l);
+/* This function adds the specified listener's file descriptor to the polling
+ * lists if it is in the LI_LISTEN state. The listener enters LI_READY or
+ * LI_FULL state depending on its number of connections. In daemon mode, we
+ * also support binding only the relevant processes to their respective
+ * listeners. We don't do that in debug mode however.
+ */
+void enable_listener(struct listener *listener);
+
/* This function adds all of the protocol's listener's file descriptors to the
* polling lists when they are in the LI_LISTEN state. It is intended to be
* used as a protocol's generic enable_all() primitive, for use after the
diff --git a/src/listener.c b/src/listener.c
index f1f5c801d..e84f8eec4 100644
--- a/src/listener.c
+++ b/src/listener.c
@@ -276,7 +276,7 @@ void listener_set_state(struct listener *l, enum li_state st)
* also support binding only the relevant processes to their respective
* listeners. We don't do that in debug mode however.
*/
-static void enable_listener(struct listener *listener)
+void enable_listener(struct listener *listener)
{
HA_SPIN_LOCK(LISTENER_LOCK, &listener->lock);
if (listener->state == LI_LISTEN) {