X-Git-Url: https://git.distorted.org.uk/~mdw/adns/blobdiff_plain/e9e53c73b67878001ec18b87d2801a8bb9bc16cb..fc6a52aea07419d4eb1a42458ba2459faf52e4b9:/src/query.c diff --git a/src/query.c b/src/query.c index 0debcd1..b9860bf 100644 --- a/src/query.c +++ b/src/query.c @@ -76,7 +76,7 @@ static adns_query query_alloc(adns_state ads, const typeinfo *typei, qu->answer->type= typei->type; qu->answer->expires= -1; qu->answer->nrrs= 0; - qu->answer->rrs= 0; + qu->answer->rrs.untyped= 0; qu->answer->rrsz= typei->rrsz; return qu; @@ -334,7 +334,7 @@ void adns__reset_cnameonly(adns_query qu) { assert(!qu->final_allocspace); cancel_children(qu); qu->answer->nrrs= 0; - qu->answer->rrs= 0; + qu->answer->rrs.untyped= 0; qu->interim_allocd= qu->answer->cname ? MEM_ROUND(strlen(qu->answer->cname)+1) : 0; } @@ -437,6 +437,7 @@ void adns__query_done(adns_query qu) { parent= qu->parent; if (parent) { LIST_UNLINK_PART(parent->children,qu,siblings.); + if (!parent->children.head) LIST_UNLINK(qu->ads->childw,parent); qu->ctx.callback(parent,qu); free_query_allocs(qu); free(qu);