diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-08 19:09:14 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-08 19:09:14 +0100 |
commit | 9225d2eb95f2860e51bbb627796943a3076878d1 (patch) | |
tree | 8683fe80e83fafc78cf0eee354450557d18e2026 /src/libstat/backends/sqlite3_backend.c | |
parent | 91a05a2caa1f35b78d704ed93f52c0c2f6c491cd (diff) | |
download | rspamd-9225d2eb95f2860e51bbb627796943a3076878d1.tar.gz rspamd-9225d2eb95f2860e51bbb627796943a3076878d1.zip |
Fix creating languages on learning.
Diffstat (limited to 'src/libstat/backends/sqlite3_backend.c')
-rw-r--r-- | src/libstat/backends/sqlite3_backend.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/libstat/backends/sqlite3_backend.c b/src/libstat/backends/sqlite3_backend.c index 50c9886df..a9299e31e 100644 --- a/src/libstat/backends/sqlite3_backend.c +++ b/src/libstat/backends/sqlite3_backend.c @@ -509,6 +509,16 @@ rspamd_sqlite3_init (struct rspamd_stat_ctx *ctx, bk->enable_languages = FALSE; } + if (bk->enable_languages) { + msg_info_config ("enable per language statistics for %s", + stf->symbol); + } + + if (bk->enable_users) { + msg_info_config ("enable per users statistics for %s", + stf->symbol); + } + ctx->statfiles ++; curst = curst->next; @@ -656,6 +666,9 @@ rspamd_sqlite3_finalize_process (struct rspamd_task *task, gpointer runtime, bk->in_transaction = FALSE; } + rt->lang_id = -1; + rt->user_id = -1; + return; } @@ -692,7 +705,7 @@ rspamd_sqlite3_learn_token (struct rspamd_task *task, struct token_node_s *tok, } if (rt->lang_id == -1) { - rt->lang_id = rspamd_sqlite3_get_language (bk, task, FALSE); + rt->lang_id = rspamd_sqlite3_get_language (bk, task, TRUE); } iv = res->value; |