MINOR: listeners: export enable_listener()

we'll soon call it from outside.
This commit is contained in:
Willy Tarreau 2020-09-25 16:40:18 +02:00
parent d008009958
commit 7834a3f70f
2 changed files with 9 additions and 1 deletions

View File

@ -48,6 +48,14 @@ int pause_listener(struct listener *l);
*/ */
int resume_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 /* 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 * 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 * used as a protocol's generic enable_all() primitive, for use after the

View 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 * 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.
*/ */
static void enable_listener(struct listener *listener) void enable_listener(struct listener *listener)
{ {
HA_SPIN_LOCK(LISTENER_LOCK, &listener->lock); HA_SPIN_LOCK(LISTENER_LOCK, &listener->lock);
if (listener->state == LI_LISTEN) { if (listener->state == LI_LISTEN) {