diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-09-16 16:01:20 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-09-16 16:01:20 +0400 |
commit | b56ea3dcdf09355681bd824c290a6373aee0180a (patch) | |
tree | be3abef4a027a43d0b07c8ee34a5cea359314b67 /src/classifiers | |
parent | c8dd7855398d175e8482e7bd5cfb499e7b1b3258 (diff) | |
download | rspamd-b56ea3dcdf09355681bd824c290a6373aee0180a.tar.gz rspamd-b56ea3dcdf09355681bd824c290a6373aee0180a.zip |
* Remove assert
* Fix build WITH_LUA
* Fix calling of classifier
* Fix autolearn
Diffstat (limited to 'src/classifiers')
-rw-r--r-- | src/classifiers/winnow.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/classifiers/winnow.c b/src/classifiers/winnow.c index 88298faf4..94b342525 100644 --- a/src/classifiers/winnow.c +++ b/src/classifiers/winnow.c @@ -184,7 +184,9 @@ winnow_learn (struct classifier_ctx *ctx, statfile_pool_t *pool, char *symbol, G cur = g_list_next (cur); } - statfile_pool_lock_file (pool, data.file); - g_tree_foreach (input, learn_callback, &data); - statfile_pool_unlock_file (pool, data.file); + if (data.file != NULL) { + statfile_pool_lock_file (pool, data.file); + g_tree_foreach (input, learn_callback, &data); + statfile_pool_unlock_file (pool, data.file); + } } |