summaryrefslogtreecommitdiffstats
path: root/src/filter.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-01-28 19:19:20 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-01-28 19:19:20 +0300
commit24e7403974f65b788ad81071d30c092adde97f4e (patch)
tree86640b5a4b64ad3f21e9feb64da28df3c4f4135b /src/filter.c
parent5a21d1f8f5809db3d3b52f3127120a83ca70f2aa (diff)
downloadrspamd-24e7403974f65b788ad81071d30c092adde97f4e.tar.gz
rspamd-24e7403974f65b788ad81071d30c092adde97f4e.zip
* Fix bug with calling consolidation function after stop_point
* Use shared memory for storing pool allocator statistics * Fix bug with processing statfiles results
Diffstat (limited to 'src/filter.c')
-rw-r--r--src/filter.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/filter.c b/src/filter.c
index 651aac267..b847831d7 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -140,6 +140,8 @@ metric_process_callback (gpointer key, gpointer value, void *data)
else {
metric_res->score = factor_consolidation_func (task, metric_res->metric->name);
}
+ msg_debug ("process_metric_callback: got result %.2f from consolidation function for metric %s",
+ metric_res->score, metric_res->metric->name);
}
static int
@@ -196,6 +198,8 @@ continue_process_filters (struct worker_task *task)
}
cur = LIST_NEXT (cur, next);
}
+ /* Process all metrics */
+ g_hash_table_foreach (task->results, metric_process_callback, task);
/* All done */
bufferevent_enable (task->bev, EV_WRITE);
evbuffer_drain (task->bev->output, EVBUFFER_LENGTH (task->bev->output));
@@ -418,6 +422,7 @@ statfiles_callback (gpointer key, gpointer value, void *arg)
res->symbols = g_list_prepend (NULL, st->alias);
res->weight = st->classifier->add_result_func (res->weight, weight * st->weight);
}
+ msg_debug ("process_statfiles: result weight: %.2f", res->weight);
}
}
@@ -450,6 +455,7 @@ statfiles_results_callback (gpointer key, gpointer value, void *arg)
else {
metric_res->score += res->weight;
}
+ msg_debug ("statfiles_results_callback: got total weight %.2f for metric %s", metric_res->score, metric->name);
cur_symbol = g_list_first (res->symbols);
while (cur_symbol) {
@@ -458,6 +464,8 @@ statfiles_results_callback (gpointer key, gpointer value, void *arg)
cur_symbol = g_list_next (cur_symbol);
}
+ g_list_free (res->symbols);
+
}