diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-07 18:26:21 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-07 18:26:21 +0000 |
commit | b8ef681bf93ba393b0ce3168b2af6a6173ae4464 (patch) | |
tree | 5b7501261eb545e46b7d2287aaa43cd4227b5bdd /src/hs_helper.c | |
parent | aaf38beddb6b78d15c0e1cbca0857ea001c15b34 (diff) | |
download | rspamd-b8ef681bf93ba393b0ce3168b2af6a6173ae4464.tar.gz rspamd-b8ef681bf93ba393b0ce3168b2af6a6173ae4464.zip |
Fix serializing of hyperscan regexps
Diffstat (limited to 'src/hs_helper.c')
-rw-r--r-- | src/hs_helper.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/hs_helper.c b/src/hs_helper.c index 0e912daa1..220224572 100644 --- a/src/hs_helper.c +++ b/src/hs_helper.c @@ -127,6 +127,7 @@ start_hs_helper (struct rspamd_worker *worker) struct hs_helper_ctx *ctx = worker->ctx; GError *err = NULL; struct rspamd_srv_command srv_cmd; + gint ncompiled; ctx->ev_base = rspamd_prepare_worker (worker, "hs_helper", @@ -136,9 +137,9 @@ start_hs_helper (struct rspamd_worker *worker) msg_warn ("cannot cleanup cache dir '%s'", ctx->hs_dir); } - if (!rspamd_re_cache_compile_hyperscan (ctx->cfg->re_cache, + if ((ncompiled = rspamd_re_cache_compile_hyperscan (ctx->cfg->re_cache, ctx->hs_dir, - &err)) { + &err)) == -1) { msg_err ("failed to compile re cache: %e", err); g_error_free (err); @@ -146,6 +147,9 @@ start_hs_helper (struct rspamd_worker *worker) exit (EXIT_SUCCESS); } + msg_info ("compiled %d regular expressions to the hyperscan tree", + ncompiled); + event_base_loop (ctx->ev_base, 0); rspamd_worker_block_signals (); |