]> source.dussan.org Git - rspamd.git/commitdiff
Insert symbols counting their weights with respect to grow_factor.
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Wed, 17 Aug 2011 11:58:30 +0000 (15:58 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Wed, 17 Aug 2011 11:58:30 +0000 (15:58 +0400)
src/filter.c

index c0c21681d20bbdc1ad23f94a86ccb9640d260838..f4048955d8d7f1af5950494677d5a821a1b58b2c 100644 (file)
@@ -112,7 +112,6 @@ insert_metric_result (struct worker_task *task, struct metric *metric, const gch
        }
        else {
                s = memory_pool_alloc (task->task_pool, sizeof (struct symbol));
-               s->score = w;
 
                /* Handle grow factor */
                if (metric_res->grow_factor && w > 0) {
@@ -122,6 +121,8 @@ insert_metric_result (struct worker_task *task, struct metric *metric, const gch
                else if (w > 0) {
                        metric_res->grow_factor = metric->grow_factor;
                }
+
+               s->score = w;
                s->name = symbol;
                metric_res->score += w;