Commit f92610a7 authored by Marek Vavruša's avatar Marek Vavruša

daemon/lua: alias for resolve()

parent 87600d37
......@@ -11,6 +11,7 @@ day = 24 * hour
-- Resolver bindings
kres = require('kres')
trust_anchors = require('trust_anchors')
resolve = worker.resolve
-- Function aliases
-- `env.VAR returns os.getenv(VAR)`
......
......@@ -91,7 +91,7 @@ end
local function refresh_plan(trust_anchors, timeout, refresh_cb)
if trust_anchors.refresh_ev ~= nil then event.cancel(trust_anchors.refresh_ev) end
trust_anchors.refresh_ev = event.after(timeout, function (ev)
worker.resolve('.', kres.type.DNSKEY, kres.class.IN, kres.query.NO_CACHE,
resolve('.', kres.type.DNSKEY, kres.class.IN, kres.query.NO_CACHE,
function (pkt)
-- Schedule itself with updated timeout
local next_time = refresh_cb(trust_anchors, kres.pkt_t(pkt))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment