From 9c98c1f866d8e54b1592144486957104c19a579a Mon Sep 17 00:00:00 2001 From: Simon Arlott Date: Tue, 1 Mar 2016 21:30:51 +0000 Subject: [PATCH] ircd: add missing sslproc function ssld_foreach_info() Iterate through the ssl daemons and report their status. --- src/sslproc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/sslproc.c b/src/sslproc.c index 2ecd9d95..f7af434d 100644 --- a/src/sslproc.c +++ b/src/sslproc.c @@ -936,6 +936,20 @@ get_ssld_count(void) return ssld_count; } +void +ssld_foreach_info(void (*func)(void *data, pid_t pid, int cli_count, enum ssld_status status), void *data) +{ + rb_dlink_node *ptr, *next; + ssl_ctl_t *ctl; + RB_DLINK_FOREACH_SAFE(ptr, next, ssl_daemons.head) + { + ctl = ptr->data; + func(data, ctl->pid, ctl->cli_count, + ctl->dead ? SSLD_DEAD : + (ctl->shutdown ? SSLD_SHUTDOWN : SSLD_ACTIVE)); + } +} + void init_ssld(void) {