diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-14 19:09:04 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-14 19:09:04 +0100 |
commit | 45aeb65baa5793a1177bb823bd6bdd0b959d25f8 (patch) | |
tree | dde35fe6e398a322ba9f3f8aa61342e8015ec9b3 /src/libserver/cfg_rcl.c | |
parent | ee1e8c27b804061f0e981ddc0b575291e4148c31 (diff) | |
download | rspamd-45aeb65baa5793a1177bb823bd6bdd0b959d25f8.tar.gz rspamd-45aeb65baa5793a1177bb823bd6bdd0b959d25f8.zip |
[Feature] Implement caching for hyperscan multipattern
Diffstat (limited to 'src/libserver/cfg_rcl.c')
-rw-r--r-- | src/libserver/cfg_rcl.c | 12 |
1 files changed, 10 insertions, 2 deletions
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 <syslog.h> @@ -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 { |