2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

use handles for isc_nm_pauseread() and isc_nm_resumeread()

by having these functions act on netmgr handles instead of socket
objects, they can be used in callback functions outside the netgmr.
This commit is contained in:
Evan Hunt
2020-07-01 16:17:09 -07:00
parent 29dcdeba1b
commit 55896df79d
4 changed files with 24 additions and 15 deletions

View File

@@ -1379,8 +1379,10 @@ isc_nm_cancelread(isc_nmhandle_t *handle) {
}
isc_result_t
isc_nm_pauseread(isc_nmsocket_t *sock) {
REQUIRE(VALID_NMSOCK(sock));
isc_nm_pauseread(isc_nmhandle_t *handle) {
REQUIRE(VALID_NMHANDLE(handle));
isc_nmsocket_t *sock = handle->sock;
switch (sock->type) {
case isc_nm_tcpsocket:
@@ -1392,8 +1394,10 @@ isc_nm_pauseread(isc_nmsocket_t *sock) {
}
isc_result_t
isc_nm_resumeread(isc_nmsocket_t *sock) {
REQUIRE(VALID_NMSOCK(sock));
isc_nm_resumeread(isc_nmhandle_t *handle) {
REQUIRE(VALID_NMHANDLE(handle));
isc_nmsocket_t *sock = handle->sock;
switch (sock->type) {
case isc_nm_tcpsocket: