diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-11-25 16:30:57 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-11-25 16:30:57 +0000 |
commit | b519db32ad4368e024ae413e151411ecd114c2fd (patch) | |
tree | 6c7a1abafbba46a869fc25d14e9dbb8fde9ae363 /src | |
parent | 250146dd53fec9b63952c99efcd0d0c6dc4d52e1 (diff) | |
download | rspamd-b519db32ad4368e024ae413e151411ecd114c2fd.tar.gz rspamd-b519db32ad4368e024ae413e151411ecd114c2fd.zip |
[Fix] Fix loading of maps from UCL objects
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/map.c | 10 | ||||
-rw-r--r-- | src/plugins/lua/mid.lua | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/libutil/map.c b/src/libutil/map.c index 0ea3ce067..439a13e94 100644 --- a/src/libutil/map.c +++ b/src/libutil/map.c @@ -1592,7 +1592,7 @@ rspamd_map_add_from_ucl (struct rspamd_config *cfg, } if (map->backends->len == 0) { - msg_err_config ("map has no urls to be loaded"); + msg_err_config ("map has no urls to be loaded: empty list"); goto err; } } @@ -1619,11 +1619,11 @@ rspamd_map_add_from_ucl (struct rspamd_config *cfg, elt = ucl_object_lookup_any (obj, "upstreams", "url", "urls", NULL); if (elt == NULL) { - msg_err_config ("map has no urls to be loaded"); + msg_err_config ("map has no urls to be loaded: no elt"); goto err; } - if (ucl_object_type (obj) == UCL_ARRAY) { + if (ucl_object_type (elt) == UCL_ARRAY) { /* Add array of maps as multiple backends */ while ((cur = ucl_object_iterate (elt, &it, true)) != NULL) { if (ucl_object_type (cur) == UCL_STRING) { @@ -1645,7 +1645,7 @@ rspamd_map_add_from_ucl (struct rspamd_config *cfg, } if (map->backends->len == 0) { - msg_err_config ("map has no urls to be loaded"); + msg_err_config ("map has no urls to be loaded: empty object list"); goto err; } } @@ -1662,7 +1662,7 @@ rspamd_map_add_from_ucl (struct rspamd_config *cfg, } if (map->backends->len == 0) { - msg_err_config ("map has no urls to be loaded"); + msg_err_config ("map has no urls to be loaded: no valid backends"); goto err; } } diff --git a/src/plugins/lua/mid.lua b/src/plugins/lua/mid.lua index 8c4757880..0ca26b91f 100644 --- a/src/plugins/lua/mid.lua +++ b/src/plugins/lua/mid.lua @@ -90,6 +90,6 @@ if opts then rspamd_config:register_dependency(id, settings['symbol_dkim_allow']) else - rspamd_logger.infox(rspamd_config, 'url is not specified, disabling module') + rspamd_logger.infox(rspamd_config, 'source is not specified, disabling module') end end |