]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Replace cursor functions with pair_list functions in rlm_cache.c
authorNick Porter <nick@portercomputing.co.uk>
Fri, 8 Jan 2021 13:35:37 +0000 (13:35 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 21 Jan 2021 23:05:49 +0000 (23:05 +0000)
src/modules/rlm_cache/rlm_cache.c

index d085450f4404929dc2214f09b88e35a9c3e43a80..59cdcff8154bbfdd4596d24e5ffa03bdca186778 100644 (file)
@@ -335,7 +335,6 @@ static unlang_action_t cache_insert(rlm_rcode_t *p_result,
        pool = talloc_pool(NULL, 2048);
        for (map = inst->maps; map != NULL; map = map->next) {
                fr_pair_list_t  to_cache;
-               fr_cursor_t     cursor;
 
                fr_pair_list_init(&to_cache);
                fr_assert(map->lhs && map->rhs);
@@ -349,9 +348,9 @@ static unlang_action_t cache_insert(rlm_rcode_t *p_result,
                        continue;
                }
 
-               for (vp = fr_cursor_init(&cursor, &to_cache);
+               for (vp = fr_pair_list_head(&to_cache);
                     vp;
-                    vp = fr_cursor_next(&cursor)) {
+                    vp = fr_pair_list_next(&to_cache, vp)) {
                        /*
                         *      Prevent people from accidentally caching
                         *      cache control attributes.