From 035d9143bdddfedc3c5bfd54a7f7d56cb5bbd4ab 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. --- ircd/sslproc.c | 14 ++++++++++++++ modules/m_stats.c | 2 -- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ircd/sslproc.c b/ircd/sslproc.c index 4fad6dc4..9b79a246 100644 --- a/ircd/sslproc.c +++ b/ircd/sslproc.c @@ -937,6 +937,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) { diff --git a/modules/m_stats.c b/modules/m_stats.c index 1bdeb244..a7495225 100644 --- a/modules/m_stats.c +++ b/modules/m_stats.c @@ -903,9 +903,7 @@ stats_ssld_foreach(void *data, pid_t pid, int cli_count, enum ssld_status status static void stats_ssld(struct Client *source_p) { -#if 0 ssld_foreach_info(stats_ssld_foreach, source_p); -#endif } static void