aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/cfg_rcl.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-03-21 14:29:51 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-03-21 14:29:51 +0000
commitc77a64032de252034f06ab280e01590ef0bb4c95 (patch)
tree776b2aebf38074df5a3d3e47ae48aae5fd88e193 /src/libserver/cfg_rcl.c
parenta22e432387c6d62c41228eccac67e1085d5dee31 (diff)
downloadrspamd-c77a64032de252034f06ab280e01590ef0bb4c95.tar.gz
rspamd-c77a64032de252034f06ab280e01590ef0bb4c95.zip
[Fix] Finally fix default parameters parsing in actions section
Diffstat (limited to 'src/libserver/cfg_rcl.c')
-rw-r--r--src/libserver/cfg_rcl.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c
index 9ea80a49c..9a2d7cd19 100644
--- a/src/libserver/cfg_rcl.c
+++ b/src/libserver/cfg_rcl.c
@@ -584,6 +584,21 @@ rspamd_rcl_actions_handler (rspamd_mempool_t *pool, const ucl_object_t *obj,
ucl_object_get_priority (cur));
}
else if (type == UCL_OBJECT || type == UCL_FLOAT || type == UCL_INT) {
+ /* Exceptions */
+ struct rspamd_rcl_default_handler_data *sec_cur, *sec_tmp;
+ gboolean default_elt = FALSE;
+
+ HASH_ITER (hh, section->default_parser, sec_cur, sec_tmp) {
+ if (strcmp (ucl_object_key (cur), sec_cur->key) == 0) {
+ default_elt = TRUE;
+ }
+ }
+
+ if (default_elt) {
+ continue;
+ }
+
+ /* Something non-default */
if (!rspamd_config_set_action_score (cfg,
ucl_object_key (cur),
cur)) {