0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 02:02:38 +01:00

authd: change reload character to R from H.

This is more in line with the specification @kaniini laid out.
This commit is contained in:
Elizabeth Myers 2016-03-25 21:00:13 -05:00
parent de7cf7e009
commit 122ae255d7
2 changed files with 8 additions and 3 deletions

View file

@ -28,7 +28,7 @@ static void handle_stat(int parc, char *parv[]);
rb_helper *authd_helper = NULL; rb_helper *authd_helper = NULL;
authd_cmd_handler authd_cmd_handlers[256] = { authd_cmd_handler authd_cmd_handlers[256] = {
['H'] = handle_reload, ['R'] = handle_reload,
['D'] = resolve_dns, ['D'] = resolve_dns,
['S'] = handle_stat, ['S'] = handle_stat,
}; };
@ -62,8 +62,13 @@ handle_reload(int parc, char *parv[])
authd_reload_handler handler; authd_reload_handler handler;
if(parc < 2) 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; return;
}
if (!(handler = authd_reload_handlers[(unsigned char)parv[1][0]])) if (!(handler = authd_reload_handlers[(unsigned char)parv[1][0]]))
return; return;

View file

@ -303,7 +303,7 @@ void
reload_nameservers(void) reload_nameservers(void)
{ {
check_authd(); check_authd();
rb_helper_write(authd_helper, "H D"); rb_helper_write(authd_helper, "R D");
(void)get_nameservers(stats_results_callback, NULL); (void)get_nameservers(stats_results_callback, NULL);
} }