aboutsummaryrefslogtreecommitdiffstats
path: root/src/cfg_file.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/cfg_file.y')
-rw-r--r--src/cfg_file.y10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cfg_file.y b/src/cfg_file.y
index 5cd98e9fc..b62b6b5b4 100644
--- a/src/cfg_file.y
+++ b/src/cfg_file.y
@@ -8,6 +8,11 @@
#include "expressions.h"
#include "classifiers/classifiers.h"
#include "tokenizers/tokenizers.h"
+#ifdef WITH_LUA
+#include "lua-rspamd.h"
+#else
+#include "perl.h"
+#endif
#define YYDEBUG 1
@@ -323,6 +328,11 @@ metricfunction:
cur_metric = memory_pool_alloc0 (cfg->cfg_pool, sizeof (struct metric));
}
cur_metric->func_name = memory_pool_strdup (cfg->cfg_pool, $3);
+#ifdef WITH_LUA
+ cur_metric->func = lua_consolidation_func;
+#else
+ cur_metric->func = perl_consolidation_func;
+#endif
}
;