Commit 26adb0b0 authored by Marek Vavruša's avatar Marek Vavruša Committed by Marek Vavruša

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.
parent 0a04428e
......@@ -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);
......
......@@ -96,6 +96,7 @@ struct kr_query {
uint32_t uid; /**< Query iteration number, unique within the kr_rplan. */
/** Pointer to the query that originated this one because of following a CNAME (or NULL). */
struct kr_query *cname_parent;
struct kr_request *request; /**< Parent resolution request. */
};
/** @cond internal Array of queries. */
......
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