]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: listeners: export enable_listener()
authorWilly Tarreau <w@1wt.eu>
Fri, 25 Sep 2020 14:40:18 +0000 (16:40 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2020 09:27:30 +0000 (11:27 +0200)
we'll soon call it from outside.

include/haproxy/listener.h
src/listener.c

index e2574e6785716b19eabaa0e27d15d28907d8f555..ccd9a47105d324a58053ae205c92864a15b49c6b 100644 (file)
@@ -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
index 30d12e9a3e45cfce11b97d9fa745dddce39f4779..9bc109702a90c2e6b7fbc16dd86be0ee710bc230 100644 (file)
@@ -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) {