From 87232e48b7eae8a4cc0ba429d8eecbf6d99e2d3a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 21 Sep 2019 16:18:27 +0100 Subject: [Project] Add child change control command type --- src/libserver/rspamd_control.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/libserver/rspamd_control.h') diff --git a/src/libserver/rspamd_control.h b/src/libserver/rspamd_control.h index b04fca09d..6c092ca74 100644 --- a/src/libserver/rspamd_control.h +++ b/src/libserver/rspamd_control.h @@ -37,6 +37,7 @@ enum rspamd_control_type { RSPAMD_CONTROL_FUZZY_STAT, RSPAMD_CONTROL_FUZZY_SYNC, RSPAMD_CONTROL_MONITORED_CHANGE, + RSPAMD_CONTROL_CHILD_CHANGE, RSPAMD_CONTROL_MAX }; @@ -86,6 +87,15 @@ struct rspamd_control_command { struct { guint unused; } fuzzy_sync; + struct { + enum { + rspamd_child_offline, + rspamd_child_online, + rspamd_child_terminated, + } what; + pid_t pid; + guint additional; + } child_change; } cmd; }; @@ -246,10 +256,9 @@ void rspamd_srv_send_command (struct rspamd_worker *worker, * @param cmd * @param except_pid */ -void -rspamd_control_broadcast_srv_cmd (struct rspamd_main *rspamd_main, - struct rspamd_control_command *cmd, - pid_t except_pid); +void rspamd_control_broadcast_srv_cmd (struct rspamd_main *rspamd_main, + struct rspamd_control_command *cmd, + pid_t except_pid); /** * Returns command from a specified string (case insensitive) -- cgit v1.2.3