aboutsummaryrefslogtreecommitdiffstats
path: root/src/classifiers
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-09-16 16:01:20 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-09-16 16:01:20 +0400
commitb56ea3dcdf09355681bd824c290a6373aee0180a (patch)
treebe3abef4a027a43d0b07c8ee34a5cea359314b67 /src/classifiers
parentc8dd7855398d175e8482e7bd5cfb499e7b1b3258 (diff)
downloadrspamd-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.c8
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);
+ }
}