aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/backends/sqlite3_backend.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-22 13:49:10 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-22 13:49:10 +0000
commitef6ed76aa67ada4dc45b0b0bccb437b22d56a2ab (patch)
treec70c8b8a53e38a2be8c770c488c95f8008dfb8a9 /src/libstat/backends/sqlite3_backend.c
parentc6836066bd90451f97c4db256385e23f2e922572 (diff)
downloadrspamd-ef6ed76aa67ada4dc45b0b0bccb437b22d56a2ab.tar.gz
rspamd-ef6ed76aa67ada4dc45b0b0bccb437b22d56a2ab.zip
[Feature] Do not classify message if some class is missing
Diffstat (limited to 'src/libstat/backends/sqlite3_backend.c')
-rw-r--r--src/libstat/backends/sqlite3_backend.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstat/backends/sqlite3_backend.c b/src/libstat/backends/sqlite3_backend.c
index 36bbaa20e..f90e6b93a 100644
--- a/src/libstat/backends/sqlite3_backend.c
+++ b/src/libstat/backends/sqlite3_backend.c
@@ -723,6 +723,13 @@ rspamd_sqlite3_process_tokens (struct rspamd_task *task,
else {
tok->values[id] = 0.0;
}
+
+ if (rt->cf->is_spam) {
+ task->flags |= RSPAMD_TASK_FLAG_HAS_SPAM_TOKENS;
+ }
+ else {
+ task->flags |= RSPAMD_TASK_FLAG_HAS_HAM_TOKENS;
+ }
}