diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-07-06 19:36:39 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-07-06 19:36:39 +0100 |
commit | e902637bcc1f37a2c7f70c50dad641476056ce8a (patch) | |
tree | 9959dc88f41f047b11c883af7cb45ae4bed6a2ce /src/libserver | |
parent | f025f6935711db580d0a193deef48e4705420966 (diff) | |
download | rspamd-e902637bcc1f37a2c7f70c50dad641476056ce8a.tar.gz rspamd-e902637bcc1f37a2c7f70c50dad641476056ce8a.zip |
[Minor] Further fixes to the monitored logic
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/rspamd_control.c | 1 | ||||
-rw-r--r-- | src/libserver/rspamd_control.h | 2 | ||||
-rw-r--r-- | src/libserver/worker_util.c | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/src/libserver/rspamd_control.c b/src/libserver/rspamd_control.c index 5d8008415..90dabc4e1 100644 --- a/src/libserver/rspamd_control.c +++ b/src/libserver/rspamd_control.c @@ -823,6 +823,7 @@ rspamd_srv_handler (gint fd, short what, gpointer ud) cmd.cmd.monitored_change.tag, sizeof (wcmd.cmd.monitored_change.tag)); wcmd.cmd.monitored_change.alive = cmd.cmd.monitored_change.alive; + wcmd.cmd.monitored_change.sender = cmd.cmd.monitored_change.sender; rspamd_control_broadcast_cmd (srv, &wcmd, rfd, rspamd_control_hs_io_handler, NULL); break; diff --git a/src/libserver/rspamd_control.h b/src/libserver/rspamd_control.h index fd1395d96..ba26cd187 100644 --- a/src/libserver/rspamd_control.h +++ b/src/libserver/rspamd_control.h @@ -69,6 +69,7 @@ struct rspamd_control_command { struct { gchar tag[32]; gboolean alive; + pid_t sender; } monitored_change; struct { enum rspamd_log_pipe_type type; @@ -138,6 +139,7 @@ struct rspamd_srv_command { struct { gchar tag[32]; gboolean alive; + pid_t sender; } monitored_change; struct { enum rspamd_log_pipe_type type; diff --git a/src/libserver/worker_util.c b/src/libserver/worker_util.c index 0c0cc9344..1a564786f 100644 --- a/src/libserver/worker_util.c +++ b/src/libserver/worker_util.c @@ -821,6 +821,7 @@ rspamd_worker_monitored_on_change (struct rspamd_monitored_ctx *ctx, rspamd_strlcpy (srv_cmd.cmd.monitored_change.tag, tag, sizeof (srv_cmd.cmd.monitored_change.tag)); srv_cmd.cmd.monitored_change.alive = alive; + srv_cmd.cmd.monitored_change.sender = getpid (); msg_info_config ("broadcast monitored update for %s: %s", srv_cmd.cmd.monitored_change.tag, alive ? "alive" : "dead"); |