int uxst_event_accept(int fd);
void uxst_add_listener(struct listener *listener);
-void uxst_del_listener(struct listener *listener);
void process_uxst_stats(struct task *t, struct timeval *next);
#endif /* _PROTO_PROTO_UXST_H */
*/
int unbind_listener(struct listener *listener);
+/* Delete a listener from its protocol's list of listeners. The listener's
+ * state is automatically updated from LI_ASSIGNED to LI_INIT. The protocol's
+ * number of listeners is updated. Note that the listener must have previously
+ * been unbound. This is the generic function to use to remove a listener.
+ */
+void delete_listener(struct listener *listener);
+
/* Registers the protocol <proto> */
void protocol_register(struct protocol *proto);
proto_unix.nb_listeners++;
}
-/* Delete a listener from the list of unix stream listeners. The listener's
- * state is automatically updated from LI_ASSIGNED to LI_INIT. The number of
- * listeners is updated. Note that the listener must have previously been
- * unbound. This is the function to use to remove a listener.
- */
-void uxst_del_listener(struct listener *listener)
-{
- if (listener->state != LI_ASSIGNED)
- return;
- listener->state = LI_INIT;
- LIST_DEL(&listener->proto_list);
- proto_unix.nb_listeners--;
-}
-
-
/********************************
* 3) protocol-oriented functions
********************************/
return ERR_NONE;
}
+/* Delete a listener from its protocol's list of listeners. The listener's
+ * state is automatically updated from LI_ASSIGNED to LI_INIT. The protocol's
+ * number of listeners is updated. Note that the listener must have previously
+ * been unbound. This is the generic function to use to remove a listener.
+ */
+void delete_listener(struct listener *listener)
+{
+ if (listener->state != LI_ASSIGNED)
+ return;
+ listener->state = LI_INIT;
+ LIST_DEL(&listener->proto_list);
+ listener->proto->nb_listeners--;
+}
+
/* Registers the protocol <proto> */
void protocol_register(struct protocol *proto)
{