diff --git a/lib/dns/nta.c b/lib/dns/nta.c index 060fa6c32d..ce00b25d8a 100644 --- a/lib/dns/nta.c +++ b/lib/dns/nta.c @@ -579,7 +579,9 @@ dns_ntatable_save(dns_ntatable_t *ntatable, FILE *fp) { } static void -dns__nta_shutdown_cb(dns__nta_t *nta) { +dns__nta_shutdown_cb(void *arg) { + dns__nta_t *nta = arg; + REQUIRE(VALID_NTA(nta)); if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(3))) { @@ -602,7 +604,7 @@ dns__nta_shutdown(dns__nta_t *nta) { REQUIRE(VALID_NTA(nta)); dns__nta_ref(nta); - isc_async_run(nta->loop, (isc_job_cb)dns__nta_shutdown_cb, nta); + isc_async_run(nta->loop, dns__nta_shutdown_cb, nta); nta->shuttingdown = true; } diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index c9847e3b09..a3327fc961 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -634,7 +634,7 @@ resquery_connected(isc_result_t eresult, isc_region_t *region, void *arg); static void fctx_try(fetchctx_t *fctx, bool retrying, bool badcache); static void -fctx_shutdown(fetchctx_t *fctx); +fctx_shutdown(void *arg); static void fctx_minimize_qname(fetchctx_t *fctx); static void @@ -4369,7 +4369,9 @@ fctx_expired(void *arg) { } static void -fctx_shutdown(fetchctx_t *fctx) { +fctx_shutdown(void *arg) { + fetchctx_t *fctx = arg; + REQUIRE(VALID_FCTX(fctx)); fctx_done_unref(fctx, ISC_R_SHUTTINGDOWN); @@ -10151,8 +10153,7 @@ dns_resolver_shutdown(dns_resolver_t *res) { INSIST(fctx != NULL); fetchctx_ref(fctx); - isc_async_run(fctx->loop, (isc_job_cb)fctx_shutdown, - fctx); + isc_async_run(fctx->loop, fctx_shutdown, fctx); } isc_hashmap_iter_destroy(&it); RWUNLOCK(&res->fctxs_lock, isc_rwlocktype_write); @@ -10495,7 +10496,7 @@ dns_resolver_createfetch(dns_resolver_t *res, const dns_name_t *name, if (new_fctx) { fetchctx_ref(fctx); - isc_async_run(fctx->loop, (isc_job_cb)fctx_start, fctx); + isc_async_run(fctx->loop, fctx_start, fctx); } unlock: diff --git a/tests/isc/netmgr_common.c b/tests/isc/netmgr_common.c index 300fb5e27f..200ff98845 100644 --- a/tests/isc/netmgr_common.c +++ b/tests/isc/netmgr_common.c @@ -235,7 +235,7 @@ noop_recv_cb(isc_nmhandle_t *handle ISC_ATTR_UNUSED, } isc_result_t -noop_accept_cb(isc_nmhandle_t *handle ISC_ATTR_UNUSED, unsigned int eresult, +noop_accept_cb(isc_nmhandle_t *handle ISC_ATTR_UNUSED, isc_result_t eresult, void *cbarg ISC_ATTR_UNUSED) { F(); diff --git a/tests/isc/netmgr_common.h b/tests/isc/netmgr_common.h index 0e86282b72..5e8eec620e 100644 --- a/tests/isc/netmgr_common.h +++ b/tests/isc/netmgr_common.h @@ -235,7 +235,7 @@ noop_recv_cb(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region, void *cbarg); isc_result_t -noop_accept_cb(isc_nmhandle_t *handle ISC_ATTR_UNUSED, unsigned int result, +noop_accept_cb(isc_nmhandle_t *handle ISC_ATTR_UNUSED, isc_result_t result, void *cbarg ISC_ATTR_UNUSED); void