summaryrefslogtreecommitdiffstats
path: root/src/hs_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hs_helper.c')
-rw-r--r--src/hs_helper.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/hs_helper.c b/src/hs_helper.c
index 1434f551a..1292d6460 100644
--- a/src/hs_helper.c
+++ b/src/hs_helper.c
@@ -66,7 +66,7 @@ init_hs_helper (struct rspamd_config *cfg)
ctx->magic = rspamd_hs_helper_magic;
ctx->cfg = cfg;
- ctx->hs_dir = RSPAMD_DBDIR "/";
+ ctx->hs_dir = NULL;
ctx->max_time = default_max_time;
ctx->recompile_time = default_recompile_time;
@@ -249,6 +249,14 @@ start_hs_helper (struct rspamd_worker *worker)
struct timeval tv;
double tim;
+
+ if (ctx->hs_dir == NULL) {
+ ctx->hs_dir = ctx->cfg->hs_cache_dir;
+ }
+ if (ctx->hs_dir == NULL) {
+ ctx->hs_dir = RSPAMD_DBDIR "/";
+ }
+
ctx->ev_base = rspamd_prepare_worker (worker,
"hs_helper",
NULL);