mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
MINOR: listeners: Change enable_listener and disable_listener into private functions
These functions are only used in listener.c.
This commit is contained in:
parent
5580ba2e11
commit
f5b8adc5c0
@ -26,18 +26,6 @@
|
|||||||
|
|
||||||
#include <types/listener.h>
|
#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
|
/* This function tries to temporarily disable a listener, depending on the OS
|
||||||
* capabilities. Linux unbinds the listen socket after a SHUT_RD, and ignores
|
* capabilities. Linux unbinds the listen socket after a SHUT_RD, and ignores
|
||||||
* SHUT_WR. Solaris refuses either shutdown(). OpenBSD ignores SHUT_RD but
|
* SHUT_WR. Solaris refuses either shutdown(). OpenBSD ignores SHUT_RD but
|
||||||
|
@ -50,7 +50,7 @@ struct xfer_sock_list *xfer_sock_list = NULL;
|
|||||||
* also support binding only the relevant processes to their respective
|
* also support binding only the relevant processes to their respective
|
||||||
* listeners. We don't do that in debug mode however.
|
* 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 (listener->state == LI_LISTEN) {
|
||||||
if ((global.mode & (MODE_DAEMON | MODE_MWORKER)) &&
|
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
|
* polling lists if it is in the LI_READY or in the LI_FULL state. The listener
|
||||||
* enters LI_LISTEN.
|
* enters LI_LISTEN.
|
||||||
*/
|
*/
|
||||||
void disable_listener(struct listener *listener)
|
static void disable_listener(struct listener *listener)
|
||||||
{
|
{
|
||||||
if (listener->state < LI_READY)
|
if (listener->state < LI_READY)
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user