summaryrefslogtreecommitdiffstats
path: root/src/libstat/stat_process.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-10-06 17:43:17 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-10-06 18:13:04 +0100
commit34e24051282cab18f3da7a55d247bf61448defda (patch)
treef564f8ac8ab1b43eb61d6c121818f06c0b57a8f8 /src/libstat/stat_process.c
parent11332ebba77d12d62dcc13966ea24379c2ee94b4 (diff)
downloadrspamd-34e24051282cab18f3da7a55d247bf61448defda.tar.gz
rspamd-34e24051282cab18f3da7a55d247bf61448defda.zip
[Feature] Add a generic lua classifier
Diffstat (limited to 'src/libstat/stat_process.c')
-rw-r--r--src/libstat/stat_process.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c
index 6a1480ec5..228360fa6 100644
--- a/src/libstat/stat_process.c
+++ b/src/libstat/stat_process.c
@@ -667,6 +667,11 @@ rspamd_stat_backends_learn (struct rspamd_stat_ctx *st_ctx,
continue;
}
+ if (cl->cfg->flags & RSPAMD_FLAG_CLASSIFIER_NO_BACKEND) {
+ res = TRUE;
+ continue;
+ }
+
sel = cl;
for (j = 0; j < cl->statfiles_ids->len; j ++) {
@@ -759,6 +764,11 @@ rspamd_stat_backends_post_learn (struct rspamd_stat_ctx *st_ctx,
cl->cache->learn (task, spam, cache_run);
}
+ if (cl->cfg->flags & RSPAMD_FLAG_CLASSIFIER_NO_BACKEND) {
+ res = TRUE;
+ continue;
+ }
+
for (j = 0; j < cl->statfiles_ids->len; j ++) {
id = g_array_index (cl->statfiles_ids, gint, j);
st = g_ptr_array_index (st_ctx->statfiles, id);