]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
rlm_radius: better assert
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 8 Apr 2020 18:04:06 +0000 (13:04 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 8 Apr 2020 18:04:06 +0000 (13:04 -0500)
src/modules/rlm_radius/rlm_radius_udp.c

index 8d059910cfc39e80b86b8a30d12d9e8628eaedfd..f71896c1ff0fb71385272f2c8214b7e986063e97 100644 (file)
@@ -818,11 +818,12 @@ static void conn_close(UNUSED fr_event_list_t *el, void *handle, UNUSED void *uc
         *      this is bad, they should have all been
         *      released.
         */
-       if (h->tt && (fr_dlist_num_elements(&h->tt->free_list) < NUM_ELEMENTS(h->tt->id))) {
+       if (h->tt && (h->tt->num_requests != 0)) {
 #ifndef NDEBUG
                radius_track_state_log(h->tt);
 #endif
-               fr_cond_assert_fail(__FILE__, __LINE__, "0", "Tracking entries still allocated at conn close");
+               fr_cond_assert_fail(__FILE__, __LINE__, "0", "%u tracking entries still allocated at conn close",
+                                   h->tt->num_requests);
        }