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

netmgr: refactor isc__nm_incstats() and isc__nm_decstats()

route/netlink sockets don't have stats counters associated with them,
so it's now necessary to check whether socket stats exist before
incrementing or decrementing them. rather than relying on the caller
for this, we now just pass the socket and an index, and the correct
stats counter will be updated if it exists.
This commit is contained in:
Evan Hunt
2021-10-02 16:26:43 -07:00
parent 8c51a32e5c
commit 075139f60e

View File

@@ -1533,10 +1533,6 @@ isc___nmsocket_init(isc_nmsocket_t *sock, isc_nm_t *mgr, isc_nmsocket_type type,
break;
}
if (sock->statsindex != NULL) {
isc__nm_incstats(sock->mgr, sock->statsindex[STATID_ACTIVE]);
}
isc_mutex_init(&sock->lock);
isc_condition_init(&sock->cond);
isc_condition_init(&sock->scond);