From f9ec55fd9ae6d6fe38df8d787329a1d549a6db72 Mon Sep 17 00:00:00 2001 From: Artem Boldariev Date: Thu, 11 Feb 2021 19:44:19 +0200 Subject: [PATCH] fixup! start refactoring isc_nm_httprequest() into read/send --- lib/isc/netmgr/http.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/isc/netmgr/http.c b/lib/isc/netmgr/http.c index 4283a20c92..a39c93e702 100644 --- a/lib/isc/netmgr/http.c +++ b/lib/isc/netmgr/http.c @@ -1585,6 +1585,7 @@ isc__nm_async_httpsend(isc__networker_t *worker, isc__netievent_t *ev0) { REQUIRE(VALID_NMSOCK(sock)); REQUIRE(VALID_UVREQ(req)); + REQUIRE(VALID_HTTP2_SESSION(sock->h2.session)); ievent->req = NULL; handle = req->handle; @@ -1610,15 +1611,15 @@ isc__nm_async_httpsend(isc__networker_t *worker, isc__netievent_t *ev0) { } /* Server send */ - REQUIRE(VALID_NMHANDLE(handle->httpsession->handle)); - REQUIRE(VALID_NMSOCK(handle->httpsession->handle->sock)); - REQUIRE(handle->httpsession->handle->sock->tid == isc_nm_tid()); - if (inactive(sock) || handle->httpsession->closed) { failed_send_cb(sock, req, ISC_R_CANCELED); return; } + INSIST(handle->httpsession->handle->sock->tid == isc_nm_tid()); + INSIST(VALID_NMHANDLE(handle->httpsession->handle)); + INSIST(VALID_NMSOCK(handle->httpsession->handle->sock)); + memmove(sock->h2.buf, req->uvbuf.base, req->uvbuf.len); sock->h2.bufsize = req->uvbuf.len;