From 665971625a939d5f8e5f41e99636f4e74ebca5d3 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 15 Oct 2015 22:26:01 +0100 Subject: [PATCH] Minor fixes to settings. --- src/plugins/lua/settings.lua | 4 +++- test/functional/configs/stats.conf | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/lua/settings.lua b/src/plugins/lua/settings.lua index 80792ce2b..8c464431d 100644 --- a/src/plugins/lua/settings.lua +++ b/src/plugins/lua/settings.lua @@ -29,7 +29,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- https://rspamd.com/doc/configuration/settings.html local set_section = rspamd_config:get_all_opt("settings") -if not set_section then return end + local settings = { [1] = {}, [2] = {}, @@ -461,6 +461,8 @@ local function process_settings_map(string) process_settings_table(obj) end end + + return res end if set_section[1] and type(set_section[1]) == "string" then diff --git a/test/functional/configs/stats.conf b/test/functional/configs/stats.conf index c03c8b52e..06c1884aa 100644 --- a/test/functional/configs/stats.conf +++ b/test/functional/configs/stats.conf @@ -59,3 +59,5 @@ classifier { path = ${STATSDIR}/rspamd-bats-cache.sqlite; } } + +settings {} -- 2.39.5