diff options
author | Kim Alvefur <zash@zash.se> | 2022-06-19 19:58:12 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2022-06-19 19:58:12 +0200 |
commit | 34d0431440cca2a2f1a6f9387e2334466ae3df43 (patch) | |
tree | c1842de594c7965beb37e471f06cafe1de3d6427 /net | |
parent | 7215ba25ff882523d2c1d7b8c8168b218dd38ff9 (diff) | |
parent | 4f3ba05b4d16d02e7600ea707eac30a6a3a80fc8 (diff) | |
download | prosody-34d0431440cca2a2f1a6f9387e2334466ae3df43.tar.gz prosody-34d0431440cca2a2f1a6f9387e2334466ae3df43.zip |
Merge 0.12->trunk
Diffstat (limited to 'net')
-rw-r--r-- | net/unbound.lua | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/net/unbound.lua b/net/unbound.lua index 4d8f9284..ee742b7c 100644 --- a/net/unbound.lua +++ b/net/unbound.lua @@ -28,19 +28,16 @@ local parsers = dns_utils.parsers; local builtin_defaults = { hoststxt = false } local function add_defaults(conf) - if conf then - for option, default in pairs(builtin_defaults) do - if conf[option] == nil then - conf[option] = default; - end + conf = conf or {}; + for option, default in pairs(builtin_defaults) do + if conf[option] == nil then + conf[option] = default; end - for option, default in pairs(libunbound.config) do - if conf[option] == nil then - conf[option] = default; - end + end + for option, default in pairs(libunbound.config) do + if conf[option] == nil then + conf[option] = default; end - else - return builtin_defaults; end return conf; end |