MINOR: listeners: Change enable_listener and disable_listener into private functions

These functions are only used in listener.c.
This commit is contained in:
Christopher Faulet 2017-06-02 10:00:35 +02:00 committed by Willy Tarreau
parent 5580ba2e11
commit f5b8adc5c0
2 changed files with 2 additions and 14 deletions

View File

@ -26,18 +26,6 @@
#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

View 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;