]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: listeners: Change enable_listener and disable_listener into private functions
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 2 Jun 2017 08:00:35 +0000 (10:00 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 5 Sep 2017 08:14:16 +0000 (10:14 +0200)
These functions are only used in listener.c.

include/proto/listener.h
src/listener.c

index 09fcb819dce69f305d0f21737aaf8559de0c95f8..69a1f4bfd7f58d071f33a0ccedee1071c8ca134c 100644 (file)
 
 #include <types/listener.h>
 
-/* 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.
- */
-void enable_listener(struct listener *listener);
-
-/* This function removes the specified listener's file descriptor from the
- * polling lists if it is in the LI_READY or in the LI_FULL state. The listener
- * enters LI_LISTEN.
- */
-void disable_listener(struct listener *listener);
-
 /* This function tries to temporarily disable a listener, depending on the OS
  * capabilities. Linux unbinds the listen socket after a SHUT_RD, and ignores
  * SHUT_WR. Solaris refuses either shutdown(). OpenBSD ignores SHUT_RD but
index ef018f99ef762fa4f9c91095f0b97cc62f012544..abedd2fef666172cb8081f3e97bd34ff353277a8 100644 (file)
@@ -50,7 +50,7 @@ struct xfer_sock_list *xfer_sock_list = NULL;
  * 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)
+static void enable_listener(struct listener *listener)
 {
        if (listener->state == LI_LISTEN) {
                if ((global.mode & (MODE_DAEMON | MODE_MWORKER)) &&
@@ -80,7 +80,7 @@ void enable_listener(struct listener *listener)
  * polling lists if it is in the LI_READY or in the LI_FULL state. The listener
  * enters LI_LISTEN.
  */
-void disable_listener(struct listener *listener)
+static void disable_listener(struct listener *listener)
 {
        if (listener->state < LI_READY)
                return;