isc__nm_tls_settimeout() and isc__nm_http_settimeout() implementations

This commit is contained in:
Artem Boldariev
2021-02-11 18:36:30 +02:00
parent 70b1946896
commit 9d1ab27081
2 changed files with 23 additions and 6 deletions

View File

@@ -2306,9 +2306,18 @@ isc__nm_http_cleanup_data(isc_nmsocket_t *sock) {
void
isc__nm_http_settimeout(isc_nmhandle_t *handle, uint32_t timeout) {
UNUSED(handle);
UNUSED(timeout);
/* XXX not implemented yet */
isc_nmsocket_t *sock = NULL;
REQUIRE(VALID_NMHANDLE(handle));
REQUIRE(VALID_NMSOCK(handle->sock));
REQUIRE(handle->sock->type == isc_nm_httpsocket);
sock = handle->sock;
if (sock->h2.session != NULL && sock->h2.session->handle) {
INSIST(VALID_HTTP2_SESSION(sock->h2.session));
INSIST(VALID_NMHANDLE(sock->h2.session->handle));
isc_nmhandle_settimeout(sock->h2.session->handle, timeout);
}
}
/* DoH GET Query String Scanner-less Recursive Descent Parser/Verifier

View File

@@ -961,7 +961,15 @@ isc__nm_tls_cleanup_data(isc_nmsocket_t *sock) {
void
isc__nm_tls_settimeout(isc_nmhandle_t *handle, uint32_t timeout) {
UNUSED(handle);
UNUSED(timeout);
/* XXX not implemented yet */
isc_nmsocket_t *sock = NULL;
REQUIRE(VALID_NMHANDLE(handle));
REQUIRE(VALID_NMSOCK(handle->sock));
REQUIRE(handle->sock->type == isc_nm_tlssocket);
sock = handle->sock;
if (sock->outerhandle != NULL) {
INSIST(VALID_NMHANDLE(sock->outerhandle));
isc_nmhandle_settimeout(sock->outerhandle, timeout);
}
}