Lines Matching defs:qctx

95 	query_ctx_t *qctx = NULL;
124 result = ns_test_qctx_create(&qctx_params, &qctx);
140 dns_badcache_add(qctx->client->view->failcache, dns_rootname,
148 ns__query_sfcache(qctx);
151 if (qctx->result != DNS_R_SERVFAIL) {
155 isc_result_totext(qctx->result));
158 if (qctx->result != ISC_R_SUCCESS) {
162 isc_result_totext(qctx->result));
169 ns_test_qctx_destroy(&qctx);
300 query_ctx_t *qctx = NULL;
332 result = ns_test_qctx_create(&qctx_params, &qctx);
339 qctx->client->view->checknames = !test->disable_name_checks;
348 qctx->client->view);
355 ns__query_start(qctx);
359 if (qctx->result != DNS_R_REFUSED) {
363 isc_result_totext(qctx->result));
365 if (qctx->zone != NULL) {
371 if (qctx->db != NULL) {
379 if (qctx->result != ISC_R_SUCCESS) {
383 isc_result_totext(qctx->result));
385 if (qctx->zone != NULL) {
391 if (qctx->db == NULL || qctx->db != qctx->client->view->cachedb)
400 if (qctx->result != ISC_R_SUCCESS) {
404 isc_result_totext(qctx->result));
406 if (qctx->zone == NULL) {
412 if (qctx->db == qctx->client->view->cachedb) {
433 ns_test_qctx_destroy(&qctx);
631 query_ctx_t qctx; /* shallow copy of qctx passed to hook */
658 test_hookasync(query_ctx_t *qctx, isc_mem_t *memctx, void *arg,
676 rev->saved_qctx = qctx;
698 query_ctx_t *qctx = arg;
702 asdata->qctx = *qctx; /* remember passed ctx for inspection */
707 result = ns_query_hookasync(qctx, test_hookasync, asdata);
717 INSIST(qctx->client->fetchhandle == NULL);
850 * to remember the qctx at that point.
854 query_ctx_t *qctx = arg;
857 asdata->qctx = *qctx; /* remember passed ctx for inspection */
864 query_ctx_t *qctx = NULL;
907 result = ns_test_qctx_create(&qctx_params, &qctx);
909 qctx->client->sendcb = send_noop;
923 srvfail_cnt = ns_stats_get_counter(qctx->client->sctx->nsstats,
936 isc_nmhandle_attach(qctx->client->handle,
937 &qctx->client->reqhandle);
944 qctx->client->state = NS_CLIENTSTATE_WORKING;
945 result = ns__query_start(qctx);
960 ns_query_cancel(qctx->client);
966 qctx->client->now = 0; /* set to sentinel before resume */
971 INSIST(qctx->client->query.hookactx == NULL);
972 INSIST(qctx->client->state == NS_CLIENTSTATE_WORKING);
973 INSIST(qctx->client->recursionquota == NULL);
974 INSIST(ns_stats_get_counter(qctx->client->sctx->nsstats,
977 INSIST(!ISC_LINK_LINKED(qctx->client, rlink));
984 INSIST(qctx->client->now != 0);
988 INSIST(qctx->client->query.hookactx == NULL);
993 * Also, the last-generated qctx should have detach_client being true.
996 INSIST(ns_stats_get_counter(qctx->client->sctx->nsstats,
1000 /* qctx was created on resume and copied in hook */
1001 INSIST(asdata.qctx.detach_client);
1003 INSIST(qctx->detach_client);
1008 * Cleanup. Note that we've kept 'qctx' until now; otherwise
1009 * qctx->client may have been invalidated while we still need it.
1011 ns_test_qctx_destroy(&qctx);
1299 test_hookasync_e2e(query_ctx_t *qctx, isc_mem_t *memctx, void *arg,
1316 rev->saved_qctx = qctx;
1331 query_ctx_t *qctx = arg;
1337 result = ns_query_hookasync(qctx, test_hookasync_e2e, asdata);
1361 query_ctx_t *qctx = arg;
1364 INSIST(qctx->client->message->rcode == asdata->expected_rcode);
1372 query_ctx_t *qctx = NULL;
1400 result = ns_test_qctx_create(&qctx_params, &qctx);
1403 isc_sockaddr_any(&qctx->client->peeraddr); /* for sortlist */
1404 qctx->client->sendcb = send_noop;
1408 qctx->client->view);
1415 isc_nmhandle_attach(qctx->client->handle, &qctx->client->reqhandle);
1418 qctx->client->state = NS_CLIENTSTATE_WORKING;
1419 ns__query_start(qctx);
1423 ns_query_cancel(qctx->client);
1446 ns_test_qctx_destroy(&qctx);