]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Pass an HTTP handle to the read callback when finishing a stream
authorArtem Boldariev <artem@boldariev.com>
Fri, 4 Jun 2021 15:30:35 +0000 (18:30 +0300)
committerArtem Boldariev <artem@boldariev.com>
Mon, 14 Jun 2021 08:37:36 +0000 (11:37 +0300)
This commit fixes a leftover from an earlier version of the client-side
DoH code when the underlying transport handle was used directly.

lib/isc/netmgr/http.c
lib/isc/tests/doh_test.c

index e9285639ccf24f9ebdb776007100c33be71c81de..e38ff130923548f7e57caaa2fcced153ab4d46ad 100644 (file)
@@ -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);
index 75c6539ee4e6c8d27552dd060596e3b0992ea56f..2aec55fda574dffd7ae974215bdf2133e46ad14c 100644 (file)
@@ -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);