diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-05-14 17:12:55 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-05-14 17:12:55 +0400 |
commit | 9b5d1aa9540e46fb2f820d01dbb63c035ab0af18 (patch) | |
tree | 27895ee6497b1b0612f82825f09d3bba5e688648 /src/classifiers/winnow.c | |
parent | cad2dd050f38c61d4a27c89a0f6d0e818c9af66d (diff) | |
download | rspamd-9b5d1aa9540e46fb2f820d01dbb63c035ab0af18.tar.gz rspamd-9b5d1aa9540e46fb2f820d01dbb63c035ab0af18.zip |
* Fix awfull bug in classifying when first statfile has twice weight than second...
* Fix undisclosed recipients detection
Diffstat (limited to 'src/classifiers/winnow.c')
-rw-r--r-- | src/classifiers/winnow.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/classifiers/winnow.c b/src/classifiers/winnow.c index f1551fb6e..a5e7b3cf8 100644 --- a/src/classifiers/winnow.c +++ b/src/classifiers/winnow.c @@ -138,8 +138,6 @@ winnow_classify (struct classifier_ctx *ctx, statfile_pool_t * pool, GTree * inp g_assert (ctx != NULL); data.pool = pool; - data.sum = 0; - data.count = 0; data.now = time (NULL); data.ctx = ctx; @@ -167,6 +165,8 @@ winnow_classify (struct classifier_ctx *ctx, statfile_pool_t * pool, GTree * inp } while (cur) { st = cur->data; + data.sum = 0; + data.count = 0; if ((data.file = statfile_pool_is_open (pool, st->path)) == NULL) { if ((data.file = statfile_pool_open (pool, st->path, st->size, FALSE)) == NULL) { msg_warn ("cannot open %s, skip it", st->path); |