From: Artem Boldariev Date: Fri, 4 Jun 2021 15:30:35 +0000 (+0300) Subject: Pass an HTTP handle to the read callback when finishing a stream X-Git-Tag: v9.17.16~39^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=009752cab08fad5b6c9e0d6e07b0c090e2f838fc;p=thirdparty%2Fbind9.git Pass an HTTP handle to the read callback when finishing a stream This commit fixes a leftover from an earlier version of the client-side DoH code when the underlying transport handle was used directly. --- diff --git a/lib/isc/netmgr/http.c b/lib/isc/netmgr/http.c index e9285639ccf..e38ff130923 100644 --- a/lib/isc/netmgr/http.c +++ b/lib/isc/netmgr/http.c @@ -566,7 +566,8 @@ call_unlink_cstream_readcb(http_cstream_t *cstream, REQUIRE(VALID_HTTP2_SESSION(session)); REQUIRE(cstream != NULL); ISC_LIST_UNLINK(session->cstreams, cstream, link); - cstream->read_cb(session->handle, result, + INSIST(VALID_NMHANDLE(session->client_httphandle)); + cstream->read_cb(session->client_httphandle, result, &(isc_region_t){ cstream->rbuf, cstream->rbufsize }, cstream->read_cbarg); put_http_cstream(session->mctx, cstream); diff --git a/lib/isc/tests/doh_test.c b/lib/isc/tests/doh_test.c index 75c6539ee4e..2aec55fda57 100644 --- a/lib/isc/tests/doh_test.c +++ b/lib/isc/tests/doh_test.c @@ -413,7 +413,6 @@ doh_receive_reply_cb(isc_nmhandle_t *handle, isc_result_t eresult, (void)atomic_fetch_sub(&nsends, 1); atomic_fetch_add(&csends, 1); atomic_fetch_add(&creads, 1); - isc_nm_resumeread(handle); } else { /* We failed to connect; try again */ atomic_store(&was_error, true);