Commit 56db1f25 authored by Marek Vavruša's avatar Marek Vavruša

lib: initialize null qsource for resolver-initiated queries

fixes #41
parent c7e82248
......@@ -55,7 +55,7 @@ setmetatable(modules, {
k = string.match(k, '%w+')
local mod = _G[k]
local config = rawget(mod, 'config')
if mod and config then
if mod ~= nil and config ~= nil then
if k ~= v then config(v)
else config()
end
......
......@@ -350,6 +350,8 @@ int kr_resolve_begin(struct kr_request *request, struct kr_context *ctx, knot_pk
request->options = ctx->options;
request->state = KNOT_STATE_CONSUME;
request->current_query = NULL;
request->qsource.key = NULL;
request->qsource.addr = NULL;
array_init(request->authority);
array_init(request->additional);
......
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