diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-07 17:24:43 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-07 17:24:43 +0000 |
commit | 92ab6bdb44e6c4fe23a782f0a0f7c98a97aaf6e2 (patch) | |
tree | 46b7457b539da6fc3de8d684d517828dff582eaf /src/libserver | |
parent | 813685c8e0fa11bb1458823d396079c9c3470c7a (diff) | |
download | rspamd-92ab6bdb44e6c4fe23a782f0a0f7c98a97aaf6e2.tar.gz rspamd-92ab6bdb44e6c4fe23a782f0a0f7c98a97aaf6e2.zip |
Add hyperscan helper worker
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/rspamd_control.c | 13 | ||||
-rw-r--r-- | src/libserver/rspamd_control.h | 7 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/libserver/rspamd_control.c b/src/libserver/rspamd_control.c index 8f2b66641..5ba24d056 100644 --- a/src/libserver/rspamd_control.c +++ b/src/libserver/rspamd_control.c @@ -87,6 +87,13 @@ static const struct rspamd_control_cmd_match { }, .type = RSPAMD_CONTROL_RERESOLVE }, + { + .name = { + .begin = "/recompile", + .len = sizeof ("/recompile") - 1 + }, + .type = RSPAMD_CONTROL_RECOMPILE + }, }; void @@ -193,10 +200,15 @@ rspamd_control_write_reply (struct rspamd_control_session *session) total_conns += elt->reply.reply.stat.conns; break; + case RSPAMD_CONTROL_RELOAD: ucl_object_insert_key (cur, ucl_object_fromint ( elt->reply.reply.reload.status), "status", 0, false); break; + case RSPAMD_CONTROL_RECOMPILE: + ucl_object_insert_key (cur, ucl_object_fromint ( + elt->reply.reply.recompile.status), "status", 0, false); + break; case RSPAMD_CONTROL_RERESOLVE: ucl_object_insert_key (cur, ucl_object_fromint ( elt->reply.reply.reresolve.status), "status", 0, false); @@ -390,6 +402,7 @@ rspamd_control_default_cmd_handler (gint fd, rep.reply.stat.uptime = rspamd_get_calendar_ticks () - cd->worker->start_time; break; case RSPAMD_CONTROL_RELOAD: + case RSPAMD_CONTROL_RECOMPILE: break; case RSPAMD_CONTROL_RERESOLVE: if (cd->worker->srv->cfg) { diff --git a/src/libserver/rspamd_control.h b/src/libserver/rspamd_control.h index 5e8497a0a..74597a1ac 100644 --- a/src/libserver/rspamd_control.h +++ b/src/libserver/rspamd_control.h @@ -35,6 +35,7 @@ enum rspamd_control_type { RSPAMD_CONTROL_STAT = 0, RSPAMD_CONTROL_RELOAD, RSPAMD_CONTROL_RERESOLVE, + RSPAMD_CONTROL_RECOMPILE, RSPAMD_CONTROL_MAX }; @@ -54,6 +55,9 @@ struct rspamd_control_command { struct { guint unused; } reresolve; + struct { + guint unused; + } recompile; } cmd; }; @@ -73,6 +77,9 @@ struct rspamd_control_reply { struct { guint status; } reresolve; + struct { + guint status; + } recompile; } reply; }; |