aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/cfg_utils.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-03 12:13:10 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-03 12:13:10 +0000
commit5936aed13e97ac84e44e38a00dcfde16ec9fd173 (patch)
tree29c319fc298117e56aeaf97ed1780dc4cadbe5e5 /src/libserver/cfg_utils.c
parenta752628025143687ee60f6f1cf94ad483023d1db (diff)
downloadrspamd-5936aed13e97ac84e44e38a00dcfde16ec9fd173.tar.gz
rspamd-5936aed13e97ac84e44e38a00dcfde16ec9fd173.zip
Add ability to ignore certain symbols in metric when validating cache
Diffstat (limited to 'src/libserver/cfg_utils.c')
-rw-r--r--src/libserver/cfg_utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c
index 9447eaf32..042658f8a 100644
--- a/src/libserver/cfg_utils.c
+++ b/src/libserver/cfg_utils.c
@@ -1246,7 +1246,10 @@ rspamd_config_add_metric_symbol (struct rspamd_config *cfg,
sym_def->score = score;
sym_def->weight_ptr = score_ptr;
sym_def->name = rspamd_mempool_strdup (cfg->cfg_pool, symbol);
- sym_def->one_shot = one_shot;
+
+ if (one_shot) {
+ sym_def->flags |= RSPAMD_SYMBOL_FLAG_ONESHOT;
+ }
if (description) {
sym_def->description = rspamd_mempool_strdup (cfg->cfg_pool, description);