]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
4044. [bug] Change 3955 was not complete resulting is a assertion
authorMark Andrews <marka@isc.org>
Wed, 21 Jan 2015 23:38:40 +0000 (10:38 +1100)
committerMark Andrews <marka@isc.org>
Wed, 21 Jan 2015 23:38:40 +0000 (10:38 +1100)
                        failure is the timing was just right. [RT #38352]

CHANGES
lib/isc/ratelimiter.c

diff --git a/CHANGES b/CHANGES
index 1c16e4dff03d0510d01e2a986a1df25a76ddab15..0c1dea216f309c145d67ba646b345c7f6ed314fc 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+4044.  [bug]           Change 3955 was not complete resulting is a assertion
+                       failure is the timing was just right. [RT #38352]
+
 4043.  [func]          "rndc modzone" can be used to modify the 
                        configuration of an existing zone, using similar
                        syntax to "rndc addzone". [RT #37895]
index 1d78710defceff334401a79186b29f9fb207e1d5..96571e1ca471cc2c05aa8e373966e7c35924bff4 100644 (file)
@@ -154,8 +154,8 @@ isc_ratelimiter_enqueue(isc_ratelimiter_t *rl, isc_task_t *task,
        if (rl->state == isc_ratelimiter_ratelimited ||
            rl->state == isc_ratelimiter_stalled) {
                ev->ev_sender = task;
-               ISC_LIST_APPEND(rl->pending, ev, ev_link);
                *eventp = NULL;
+               ISC_LIST_APPEND(rl->pending, ev, ev_link);
        } else if (rl->state == isc_ratelimiter_idle) {
                result = isc_timer_reset(rl->timer, isc_timertype_ticker, NULL,
                                         &rl->interval, ISC_FALSE);
@@ -181,9 +181,10 @@ isc_ratelimiter_dequeue(isc_ratelimiter_t *rl, isc_event_t *event) {
        REQUIRE(event != NULL);
 
        LOCK(&rl->lock);
-       if (ISC_LINK_LINKED(event, ev_link))
+       if (ISC_LINK_LINKED(event, ev_link)) {
                ISC_LIST_UNLINK(rl->pending, event, ev_link);
-       else
+               event->ev_sender = NULL;
+       } else
                result = ISC_R_NOTFOUND;
        UNLOCK(&rl->lock);
        return (result);