]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
fr_dlist_ functions return the real object, not an fr_dlist_t
authorNick Porter <nick@portercomputing.co.uk>
Fri, 7 Feb 2025 19:37:08 +0000 (19:37 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 7 Feb 2025 19:37:08 +0000 (19:37 +0000)
src/modules/rlm_radius/bio.c

index 19cbc2f2819d1e3e4c5e886b732e538ee827c658..24dcebedf3060f97b072c4caab8b8643155f981c 100644 (file)
@@ -2707,14 +2707,11 @@ static xlat_action_t xlat_radius_client(UNUSED TALLOC_CTX *ctx, UNUSED fr_dcurso
        } else {
                fr_rb_expire_t *expire = &thread->bio.expires;
                fr_time_t now = fr_time();
-               fr_dlist_t *entry;
+               home_server_t *old;
 
                fr_rb_expire_update(expire, home, now);
 
-               while ((entry = fr_dlist_head(&expire->head)) != NULL) {
-                       home_server_t *old;
-
-                       old = fr_dlist_entry_to_item(expire->head.offset, entry);
+               while ((old = fr_dlist_head(&expire->head)) != NULL) {
                        (void) talloc_get_type_abort(old, home_server_t);
 
                        fr_assert(old->ctx.trunk);
@@ -2734,7 +2731,7 @@ static xlat_action_t xlat_radius_client(UNUSED TALLOC_CTX *ctx, UNUSED fr_dcurso
                         */
                        if (fr_time_gt(old->expire.when, now)) break;
 
-                       fr_dlist_remove(&expire->head, entry);
+                       fr_dlist_remove(&expire->head, old);
                        fr_rb_delete(&expire->tree, old);
                }
        }