From 122ae255d7b0519be1618d602e4d194fe3b6b964 Mon Sep 17 00:00:00 2001 From: Elizabeth Myers Date: Fri, 25 Mar 2016 21:00:13 -0500 Subject: [PATCH] authd: change reload character to R from H. This is more in line with the specification @kaniini laid out. --- authd/authd.c | 9 +++++++-- ircd/dns.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/authd/authd.c b/authd/authd.c index 4e7c7eb6d..81c4b3402 100644 --- a/authd/authd.c +++ b/authd/authd.c @@ -28,7 +28,7 @@ static void handle_stat(int parc, char *parv[]); rb_helper *authd_helper = NULL; authd_cmd_handler authd_cmd_handlers[256] = { - ['H'] = handle_reload, + ['R'] = handle_reload, ['D'] = resolve_dns, ['S'] = handle_stat, }; @@ -62,8 +62,13 @@ handle_reload(int parc, char *parv[]) authd_reload_handler handler; if(parc < 2) - /* XXX Should log this somehow */ + { + /* Reload all handlers */ + for(size_t i = 0; i < sizeof(authd_reload_handlers); handler = authd_reload_handlers[i++]) + handler(parv[1][0]); + return; + } if (!(handler = authd_reload_handlers[(unsigned char)parv[1][0]])) return; diff --git a/ircd/dns.c b/ircd/dns.c index ce3cd6c29..a3a8077e1 100644 --- a/ircd/dns.c +++ b/ircd/dns.c @@ -303,7 +303,7 @@ void reload_nameservers(void) { check_authd(); - rb_helper_write(authd_helper, "H D"); + rb_helper_write(authd_helper, "R D"); (void)get_nameservers(stats_results_callback, NULL); }