mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Rename sock->timer to sock->read_timer
Before adding the write timer, we have to remove the generic sock->timer to sock->read_timer. We don't touch the function names to limit the impact of the refactoring.
This commit is contained in:
@@ -1977,7 +1977,7 @@ isc__nm_failed_connect_cb(isc_nmsocket_t *sock, isc__nm_uvreq_t *req,
|
||||
REQUIRE(req->cb.connect != NULL);
|
||||
|
||||
isc__nmsocket_timer_stop(sock);
|
||||
uv_handle_set_data((uv_handle_t *)&sock->timer, sock);
|
||||
uv_handle_set_data((uv_handle_t *)&sock->read_timer, sock);
|
||||
|
||||
INSIST(atomic_compare_exchange_strong(&sock->connecting,
|
||||
&(bool){ true }, false));
|
||||
@@ -2108,7 +2108,7 @@ isc__nmsocket_timer_restart(isc_nmsocket_t *sock) {
|
||||
return;
|
||||
}
|
||||
|
||||
r = uv_timer_start(&sock->timer,
|
||||
r = uv_timer_start(&sock->read_timer,
|
||||
isc__nmsocket_connecttimeout_cb,
|
||||
sock->connect_timeout + 10, 0);
|
||||
UV_RUNTIME_CHECK(uv_timer_start, r);
|
||||
@@ -2120,7 +2120,8 @@ isc__nmsocket_timer_restart(isc_nmsocket_t *sock) {
|
||||
return;
|
||||
}
|
||||
|
||||
r = uv_timer_start(&sock->timer, isc__nmsocket_readtimeout_cb,
|
||||
r = uv_timer_start(&sock->read_timer,
|
||||
isc__nmsocket_readtimeout_cb,
|
||||
sock->read_timeout, 0);
|
||||
UV_RUNTIME_CHECK(uv_timer_start, r);
|
||||
}
|
||||
@@ -2130,7 +2131,7 @@ bool
|
||||
isc__nmsocket_timer_running(isc_nmsocket_t *sock) {
|
||||
REQUIRE(VALID_NMSOCK(sock));
|
||||
|
||||
return (uv_is_active((uv_handle_t *)&sock->timer));
|
||||
return (uv_is_active((uv_handle_t *)&sock->read_timer));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2152,7 +2153,7 @@ isc__nmsocket_timer_stop(isc_nmsocket_t *sock) {
|
||||
|
||||
/* uv_timer_stop() is idempotent, no need to check if running */
|
||||
|
||||
r = uv_timer_stop(&sock->timer);
|
||||
r = uv_timer_stop(&sock->read_timer);
|
||||
UV_RUNTIME_CHECK(uv_timer_stop, r);
|
||||
}
|
||||
|
||||
@@ -2404,7 +2405,7 @@ isc_nmhandle_cleartimeout(isc_nmhandle_t *handle) {
|
||||
default:
|
||||
handle->sock->read_timeout = 0;
|
||||
|
||||
if (uv_is_active((uv_handle_t *)&handle->sock->timer)) {
|
||||
if (uv_is_active((uv_handle_t *)&handle->sock->read_timer)) {
|
||||
isc__nmsocket_timer_stop(handle->sock);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user