From 45aeb65baa5793a1177bb823bd6bdd0b959d25f8 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 14 Apr 2016 19:09:04 +0100 Subject: [Feature] Implement caching for hyperscan multipattern --- src/libserver/cfg_rcl.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/libserver/cfg_rcl.c') diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c index 7441e5bf0..e93ba1d45 100644 --- a/src/libserver/cfg_rcl.c +++ b/src/libserver/cfg_rcl.c @@ -24,6 +24,7 @@ #include "libserver/worker_util.h" #include "unix-std.h" #include "cryptobox.h" +#include "libutil/multipattern.h" #ifdef HAVE_SYSLOG_H #include @@ -255,8 +256,15 @@ rspamd_rcl_options_handler (rspamd_mempool_t *pool, const ucl_object_t *obj, } } - return rspamd_rcl_section_parse_defaults (section, cfg->cfg_pool, obj, - cfg, err); + if (rspamd_rcl_section_parse_defaults (section, cfg->cfg_pool, obj, + cfg, err)) { + /* We need to init this early */ + rspamd_multipattern_library_init (cfg->hs_cache_dir); + + return TRUE; + } + + return FALSE; } struct rspamd_rcl_symbol_data { -- cgit v1.2.3