aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/symbols_cache.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-07-29 15:31:44 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-07-29 15:31:44 +0100
commit48c027506d6cf9496975f405f64f3c143a4c4290 (patch)
treea48c6fc20f755f612947e4db6e455b8a40f20cb3 /src/libserver/symbols_cache.c
parent99caa38084aa41938b98918b9119a288a0aefcf5 (diff)
downloadrspamd-48c027506d6cf9496975f405f64f3c143a4c4290.tar.gz
rspamd-48c027506d6cf9496975f405f64f3c143a4c4290.zip
[Feature] Skip certain symbols from ANN classify
Diffstat (limited to 'src/libserver/symbols_cache.c')
-rw-r--r--src/libserver/symbols_cache.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libserver/symbols_cache.c b/src/libserver/symbols_cache.c
index 46f1b3fc6..1c18c5559 100644
--- a/src/libserver/symbols_cache.c
+++ b/src/libserver/symbols_cache.c
@@ -730,6 +730,11 @@ rspamd_symbols_cache_add_symbol (struct symbols_cache *cache,
}
}
+ if (type & (SYMBOL_TYPE_CLASSIFIER|SYMBOL_TYPE_CALLBACK|
+ SYMBOL_TYPE_PREFILTER|SYMBOL_TYPE_POSTFILTER)) {
+ type |= SYMBOL_TYPE_NOSTAT;
+ }
+
item = rspamd_mempool_alloc0 (cache->static_pool,
sizeof (struct cache_item));
item->st = rspamd_mempool_alloc0_shared (cache->static_pool,