diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-10-16 20:46:49 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-10-16 20:46:49 +0400 |
commit | 115313228194cacf60a3e09c9b8117078ab37350 (patch) | |
tree | 046941a374876a6ab66fd92f9dafde4df17371df /src/classifiers/winnow.c | |
parent | d7a22c22ccc8aa3cd95c461d13f538b6d321ddc1 (diff) | |
download | rspamd-115313228194cacf60a3e09c9b8117078ab37350.tar.gz rspamd-115313228194cacf60a3e09c9b8117078ab37350.zip |
* Add ability to change statfile size limit in config and allow reindexing of statfiles
Diffstat (limited to 'src/classifiers/winnow.c')
-rw-r--r-- | src/classifiers/winnow.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/classifiers/winnow.c b/src/classifiers/winnow.c index 9404644ac..acf12a462 100644 --- a/src/classifiers/winnow.c +++ b/src/classifiers/winnow.c @@ -120,7 +120,7 @@ winnow_classify (struct classifier_ctx *ctx, statfile_pool_t * pool, GTree * inp while (cur) { st = cur->data; if ((data.file = statfile_pool_is_open (pool, st->path)) == NULL) { - if ((data.file = statfile_pool_open (pool, st->path)) == NULL) { + if ((data.file = statfile_pool_open (pool, st->path, st->size, FALSE)) == NULL) { msg_warn ("winnow_classify: cannot open %s, skip it", st->path); cur = g_list_next (cur); continue; @@ -174,13 +174,13 @@ winnow_learn (struct classifier_ctx *ctx, statfile_pool_t * pool, char *symbol, while (cur) { st = cur->data; if (strcmp (symbol, st->symbol) == 0) { - if ((data.file = statfile_pool_open (pool, st->path)) == NULL) { + if ((data.file = statfile_pool_open (pool, st->path, st->size, FALSE)) == NULL) { /* Try to create statfile */ - if (statfile_pool_create (pool, st->path, st->size / sizeof (struct stat_file_block)) == -1) { + if (statfile_pool_create (pool, st->path, st->size) == -1) { msg_err ("winnow_learn: cannot create statfile %s", st->path); return; } - if ((data.file = statfile_pool_open (pool, st->path)) == NULL) { + if ((data.file = statfile_pool_open (pool, st->path, st->size, FALSE)) == NULL) { msg_err ("winnow_learn: cannot create statfile %s", st->path); return; } |