*fetchp = NULL;
}
}
- if (client->query.hookaclctx != NULL) {
- client->query.hookaclctx->cancel(client->query.hookaclctx);
- client->query.hookaclctx = NULL;
+ if (client->query.hookasyncctx != NULL) {
+ client->query.hookasyncctx->cancel(client->query.hookasyncctx);
+ client->query.hookasyncctx = NULL;
}
UNLOCK(&client->query.fetchlock);
}
REQUIRE(NS_CLIENT_VALID(client));
LOCK(&client->query.fetchlock);
- if (client->query.hookaclctx != NULL) {
- INSIST(rev->ctx == client->query.hookaclctx);
- client->query.hookaclctx = NULL;
+ if (client->query.hookasyncctx != NULL) {
+ INSIST(rev->ctx == client->query.hookasyncctx);
+ client->query.hookasyncctx = NULL;
canceled = false;
client->inner.now = isc_stdtime_now();
} else {
CTRACE(ISC_LOG_DEBUG(3), "ns_query_hookasync");
REQUIRE(NS_CLIENT_VALID(client));
- REQUIRE(client->query.hookaclctx == NULL);
+ REQUIRE(client->query.hookasyncctx == NULL);
REQUIRE(FETCH_RECTYPE_NORMAL(client) == NULL);
result = acquire_recursionquota(client);
qctx_save(qctx, &saved_qctx);
result = runasync(saved_qctx, client->manager->mctx, arg,
client->manager->loop, query_hookresume, client,
- &client->query.hookaclctx);
+ &client->query.hookasyncctx);
if (result != ISC_R_SUCCESS) {
goto cleanup_and_detach_from_quota;
}
* this is actually called; otherwise tests would fail due to memory leak.
*/
static void
-destroy_hookaclctx(ns_hookasync_t **ctxp) {
+destroy_hookasyncctx(ns_hookasync_t **ctxp) {
ns_hookasync_t *ctx = *ctxp;
*ctxp = NULL;
/* 'cancel' callback of hook recursion ctx. */
static void
-cancel_hookaclctx(ns_hookasync_t *ctx) {
+cancel_hookasyncctx(ns_hookasync_t *ctx) {
/* Mark the hook data so the test can confirm this is called. */
((hookasync_data_t *)ctx->private)->canceled = true;
}
asdata->rev = rev;
*ctx = (ns_hookasync_t){
- .destroy = destroy_hookaclctx,
- .cancel = cancel_hookaclctx,
+ .destroy = destroy_hookasyncctx,
+ .cancel = cancel_hookasyncctx,
.private = asdata,
};
isc_mem_attach(mctx, &ctx->mctx);
asdata.rev->cb(asdata.rev);
/* Confirm necessary cleanup has been performed. */
- INSIST(qctx->client->query.hookaclctx == NULL);
+ INSIST(qctx->client->query.hookasyncctx == NULL);
INSIST(qctx->client->inner.state == NS_CLIENTSTATE_WORKING);
INSIST(ns_stats_get_counter(
qctx->client->manager->sctx->nsstats,
INSIST(asdata.lasthookpoint == test->hookpoint2);
}
} else {
- INSIST(qctx->client->query.hookaclctx == NULL);
+ INSIST(qctx->client->query.hookasyncctx == NULL);
}
/*
/* Cancel callback. Just need to be defined, it doesn't have to do anything. */
static void
-cancel_e2ehookaclctx(ns_hookasync_t *ctx) {
+cancel_e2ehookasyncctx(ns_hookasync_t *ctx) {
UNUSED(ctx);
}
asdata->rev = rev;
*ctx = (ns_hookasync_t){
- .destroy = destroy_hookaclctx,
- .cancel = cancel_e2ehookaclctx,
+ .destroy = destroy_hookasyncctx,
+ .cancel = cancel_e2ehookasyncctx,
.private = asdata,
};
isc_mem_attach(mctx, &ctx->mctx);