aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/stat_process.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-09-08 19:09:14 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-09-08 19:09:14 +0100
commit9225d2eb95f2860e51bbb627796943a3076878d1 (patch)
tree8683fe80e83fafc78cf0eee354450557d18e2026 /src/libstat/stat_process.c
parent91a05a2caa1f35b78d704ed93f52c0c2f6c491cd (diff)
downloadrspamd-9225d2eb95f2860e51bbb627796943a3076878d1.tar.gz
rspamd-9225d2eb95f2860e51bbb627796943a3076878d1.zip
Fix creating languages on learning.
Diffstat (limited to 'src/libstat/stat_process.c')
-rw-r--r--src/libstat/stat_process.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c
index 32367f9c4..d1e23baf2 100644
--- a/src/libstat/stat_process.c
+++ b/src/libstat/stat_process.c
@@ -708,6 +708,17 @@ rspamd_stat_learn (struct rspamd_task *task, gboolean spam, lua_State *L,
while (cur) {
cl_run = (struct rspamd_classifier_runtime *)cur->data;
+ curst = cl_run->st_runtime;
+
+ /* Needed to finalize pre-process stage */
+ while (curst) {
+ st_run = curst->data;
+ cl_run->backend->finalize_process (task,
+ st_run->backend_runtime,
+ cl_run->backend->ctx);
+ curst = g_list_next (curst);
+ }
+
if (cl_run->cl && !cl_run->skipped) {
cl_ctx = cl_run->cl->init_func (task->task_pool, cl_run->clcf);