aboutsummaryrefslogtreecommitdiffstats
path: root/src/filter.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-30 17:57:59 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-30 17:57:59 +0400
commitdd2fbb7a5b7e1c0d844900147486ad7ffd98c1e4 (patch)
treeab8bfcf6c21bd8a47f49b9f9331378e6454e90cf /src/filter.c
parentc72912310c575a5ba7e7e50a5fdd425f3a4e4dbc (diff)
downloadrspamd-dd2fbb7a5b7e1c0d844900147486ad7ffd98c1e4.tar.gz
rspamd-dd2fbb7a5b7e1c0d844900147486ad7ffd98c1e4.zip
* Add message handling functions to lua API
* Add ability to add lua code in config with .lua and .endlua * Add consolidation functions support that are written in perl or lua
Diffstat (limited to 'src/filter.c')
-rw-r--r--src/filter.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/filter.c b/src/filter.c
index a1679d499..d06987b97 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -123,7 +123,7 @@ consolidation_callback (gpointer key, gpointer value, gpointer arg)
}
double
-factor_consolidation_func (struct worker_task *task, const char *metric_name)
+factor_consolidation_func (struct worker_task *task, const char *metric_name, const char *unused)
{
struct metric_result *metric_res;
double res = 0.;
@@ -220,10 +220,10 @@ metric_process_callback (gpointer key, gpointer value, void *data)
struct metric_result *metric_res = (struct metric_result *)value;
if (metric_res->metric->func != NULL) {
- metric_res->score = metric_res->metric->func (task, metric_res->metric->name);
+ metric_res->score = metric_res->metric->func (task, metric_res->metric->name, metric_res->metric->func_name);
}
else {
- metric_res->score = factor_consolidation_func (task, metric_res->metric->name);
+ metric_res->score = factor_consolidation_func (task, metric_res->metric->name, NULL);
}
msg_debug ("process_metric_callback: got result %.2f from consolidation function for metric %s",
metric_res->score, metric_res->metric->name);