diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-23 13:21:29 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-23 13:21:29 +0000 |
commit | 5daef8fa4a4e7aadd422c943569862a9a3a7e597 (patch) | |
tree | 53372ed173a04250d04c87d2f45fb34bf6d42638 /src/libserver/cfg_rcl.c | |
parent | 002458cf05c983508e4b30f0d7755447ff87ee70 (diff) | |
parent | 57136d98d8998dfab369d7d500a4d73284be9db9 (diff) | |
download | rspamd-5daef8fa4a4e7aadd422c943569862a9a3a7e597.tar.gz rspamd-5daef8fa4a4e7aadd422c943569862a9a3a7e597.zip |
Merge pull request #1278 from fatalbanana/c
[Feature] Add mechanism for disabling composites (Fixes #1270)
Diffstat (limited to 'src/libserver/cfg_rcl.c')
-rw-r--r-- | src/libserver/cfg_rcl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c index 97dd966a9..076887dd9 100644 --- a/src/libserver/cfg_rcl.c +++ b/src/libserver/cfg_rcl.c @@ -1370,6 +1370,12 @@ rspamd_rcl_composite_handler (rspamd_mempool_t *pool, composite_name = key; + val = ucl_object_lookup (obj, "enabled"); + if (val != NULL && !ucl_object_toboolean (val)) { + msg_info_config ("composite %s is disabled", composite_name); + return TRUE; + } + if (g_hash_table_lookup (cfg->composite_symbols, composite_name) != NULL) { msg_warn_config ("composite %s is redefined", composite_name); new = FALSE; |