It will be convenient for type hooks to store information in their part
of the query context before the query is properly established. We could
have adns__internal_submit make a copy of the caller's context, but it
turns out that none of them actually care if we change it.
Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
const typeinfo *typei, vbuf *qumsg_vb,
int id,
adns_queryflags flags, struct timeval now,
const typeinfo *typei, vbuf *qumsg_vb,
int id,
adns_queryflags flags, struct timeval now,
/* Submits a query (for internal use, called during external submits).
*
* The new query is returned in *query_r, or we return adns_s_nomemory.
/* Submits a query (for internal use, called during external submits).
*
* The new query is returned in *query_r, or we return adns_s_nomemory.
* the memory for it is _taken over_ by this routine whether it
* succeeds or fails (if it succeeds, the vbuf is reused for qu->vb).
*
* the memory for it is _taken over_ by this routine whether it
* succeeds or fails (if it succeeds, the vbuf is reused for qu->vb).
*
- * *ctx is copied byte-for-byte into the query.
+ * *ctx is copied byte-for-byte into the query. Before doing this, its tinfo
+ * field may be modified by type hooks.
*
* When the child query is done, ctx->callback will be called. The
* child will already have been taken off both the global list of
*
* When the child query is done, ctx->callback will be called. The
* child will already have been taken off both the global list of
const typeinfo *typei, vbuf *qumsg_vb,
int id,
adns_queryflags flags, struct timeval now,
const typeinfo *typei, vbuf *qumsg_vb,
int id,
adns_queryflags flags, struct timeval now,
adns_query qu;
qu= query_alloc(ads,typei,typei->typekey,flags,now);
adns_query qu;
qu= query_alloc(ads,typei,typei->typekey,flags,now);