summaryrefslogtreecommitdiffstats
path: root/src/worker.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-21 13:46:01 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-22 10:57:29 +0100
commit562fac4c3c2045cc3a65f0bb37db0a7b2d47c6cb (patch)
treee52c5549f4574482854c4ef9084adc4f22ee68ee /src/worker.c
parentd432fe8292abdceea2bae0b4a07ea5256247f92d (diff)
downloadrspamd-562fac4c3c2045cc3a65f0bb37db0a7b2d47c6cb.tar.gz
rspamd-562fac4c3c2045cc3a65f0bb37db0a7b2d47c6cb.zip
[Minor] Load hyperscan cache in controller as well
Diffstat (limited to 'src/worker.c')
-rw-r--r--src/worker.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/worker.c b/src/worker.c
index ad0782b17..446de0799 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -407,38 +407,6 @@ accept_socket (EV_P_ ev_io *w, int revents)
ctx->timeout);
}
-#ifdef WITH_HYPERSCAN
-static gboolean
-rspamd_worker_hyperscan_ready (struct rspamd_main *rspamd_main,
- struct rspamd_worker *worker, gint fd,
- gint attached_fd,
- struct rspamd_control_command *cmd,
- gpointer ud)
-{
- struct rspamd_control_reply rep;
- struct rspamd_re_cache *cache = worker->srv->cfg->re_cache;
-
- memset (&rep, 0, sizeof (rep));
- rep.type = RSPAMD_CONTROL_HYPERSCAN_LOADED;
-
- if (!rspamd_re_cache_is_hs_loaded (cache) || cmd->cmd.hs_loaded.forced) {
- msg_info ("loading hyperscan expressions after receiving compilation "
- "notice: %s",
- (!rspamd_re_cache_is_hs_loaded (cache)) ?
- "new db" : "forced update");
- rep.reply.hs_loaded.status = rspamd_re_cache_load_hyperscan (
- worker->srv->cfg->re_cache, cmd->cmd.hs_loaded.cache_dir);
- }
-
- if (write (fd, &rep, sizeof (rep)) != sizeof (rep)) {
- msg_err ("cannot write reply to the control socket: %s",
- strerror (errno));
- }
-
- return TRUE;
-}
-#endif
-
static gboolean
rspamd_worker_log_pipe_handler (struct rspamd_main *rspamd_main,
struct rspamd_worker *worker, gint fd,