]> git.ipfire.org Git - thirdparty/bind9.git/commit
refactor isc_ratelimiter to use loop callbacks
authorEvan Hunt <each@isc.org>
Wed, 26 Oct 2022 01:35:41 +0000 (18:35 -0700)
committerEvan Hunt <each@isc.org>
Wed, 1 Feb 2023 05:41:19 +0000 (21:41 -0800)
commit7fd78344e01033b41e47bcb0508dd8c650154046
tree04a60ed06ad252e27acd63537e93c7410e55a42c
parentd6c3d9e04a049a625b0271a863fd294fefc122f5
refactor isc_ratelimiter to use loop callbacks

the rate limter now uses loop callbacks rather than task events.
the API for isc_ratelimiter_enqueue() has been changed; we now pass
in a loop, a callback function and a callback argument, and
receive back a rate limiter event object (isc_rlevent_t). it
is no longer necessary for the caller to allocate the event.

the callback argument needs to include a pointer to the rlevent
object so that it can be freed using isc_rlevent_free(), or by
dequeueing.
lib/dns/zone.c
lib/isc/include/isc/ratelimiter.h
lib/isc/include/isc/types.h
lib/isc/ratelimiter.c
tests/isc/ratelimiter_test.c