summaryrefslogtreecommitdiffstats
path: root/lib/rplan.c
diff options
context:
space:
mode:
authorMarek Vavruša <mvavrusa@cloudflare.com>2017-11-27 23:59:55 +0100
committerMarek Vavruša <mvavrusa@cloudflare.com>2017-12-21 07:32:02 +0100
commit26adb0b0643d6cc98ac8474f89cc7f93b7385c7f (patch)
tree1614c1ae58ecfa681e2380245a3b722ecca685f0 /lib/rplan.c
parentlib/resolve: add support for per-request logging (diff)
downloadknot-resolver-26adb0b0643d6cc98ac8474f89cc7f93b7385c7f.tar.xz
knot-resolver-26adb0b0643d6cc98ac8474f89cc7f93b7385c7f.zip
lib/rplan: remember request context in each query
This doesn't affect any of the objects lifetime, just provides a convenience for logging as some subsystems take only pointer of queries not the request object.
Diffstat (limited to 'lib/rplan.c')
-rw-r--r--lib/rplan.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rplan.c b/lib/rplan.c
index 31940bb1..79688f37 100644
--- a/lib/rplan.c
+++ b/lib/rplan.c
@@ -172,6 +172,7 @@ static struct kr_query *kr_rplan_push_query(struct kr_rplan *rplan,
/* Class and type must be set outside this function. */
qry->flags = rplan->request->options;
qry->parent = parent;
+ qry->request = rplan->request;
qry->ns.ctx = rplan->request->ctx;
qry->ns.addr[0].ip.sa_family = AF_UNSPEC;
gettimeofday(&qry->timestamp, NULL);