Comparison

net/unbound.lua @ 12974:ba409c67353b

net: Prefix module imports with prosody namespace
author Kim Alvefur <zash@zash.se>
date Fri, 17 Mar 2023 16:23:12 +0100
parent 12557:ee5b061588ea
comparison
equal deleted inserted replaced
12973:cc215923297f 12974:ba409c67353b
11 local s_format = string.format; 11 local s_format = string.format;
12 local s_lower = string.lower; 12 local s_lower = string.lower;
13 local s_upper = string.upper; 13 local s_upper = string.upper;
14 local noop = function() end; 14 local noop = function() end;
15 15
16 local logger = require "util.logger"; 16 local logger = require "prosody.util.logger";
17 local log = logger.init("unbound"); 17 local log = logger.init("unbound");
18 local net_server = require "net.server"; 18 local net_server = require "prosody.net.server";
19 local libunbound = require"lunbound"; 19 local libunbound = require"lunbound";
20 local promise = require"util.promise"; 20 local promise = require"prosody.util.promise";
21 local new_id = require "util.id".short; 21 local new_id = require "prosody.util.id".short;
22 22
23 local gettime = require"socket".gettime; 23 local gettime = require"socket".gettime;
24 local dns_utils = require"util.dns"; 24 local dns_utils = require"prosody.util.dns";
25 local classes, types, errors = dns_utils.classes, dns_utils.types, dns_utils.errors; 25 local classes, types, errors = dns_utils.classes, dns_utils.types, dns_utils.errors;
26 local parsers = dns_utils.parsers; 26 local parsers = dns_utils.parsers;
27 27
28 local builtin_defaults = { hoststxt = false } 28 local builtin_defaults = { hoststxt = false }
29 29
42 return conf; 42 return conf;
43 end 43 end
44 44
45 local unbound_config; 45 local unbound_config;
46 if prosody then 46 if prosody then
47 local config = require"core.configmanager"; 47 local config = require"prosody.core.configmanager";
48 unbound_config = add_defaults(config.get("*", "unbound")); 48 unbound_config = add_defaults(config.get("*", "unbound"));
49 prosody.events.add_handler("config-reloaded", function() 49 prosody.events.add_handler("config-reloaded", function()
50 unbound_config = add_defaults(config.get("*", "unbound")); 50 unbound_config = add_defaults(config.get("*", "unbound"));
51 end); 51 end);
52 end 52 end