]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
fix this, too
authorAlan T. DeKok <aland@freeradius.org>
Fri, 10 Dec 2021 18:01:52 +0000 (13:01 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 10 Dec 2021 18:01:52 +0000 (13:01 -0500)
src/modules/rlm_cache/rlm_cache.c
src/modules/rlm_cache/serialize.c

index 25a492bca02731621e022e26d7d1cbfdcd0d16e2..0afe721de124f3a57080c75fd2396d8a0ab5b147 100644 (file)
@@ -160,7 +160,7 @@ static rlm_rcode_t cache_merge(rlm_cache_t const *inst, request_t *request, rlm_
 
        RDEBUG2("Merging cache entry into request");
        RINDENT();
-       while ((map = fr_dlist_next(&c->maps, map))) {
+       while ((map = fr_map_list_next(&c->maps, map))) {
                /*
                 *      The only reason that the application of a map entry
                 *      can fail, is if the destination list or request
@@ -337,7 +337,7 @@ static unlang_action_t cache_insert(rlm_rcode_t *p_result,
         *      gathering fr_pair_ts to cache.
         */
        pool = talloc_pool(NULL, 2048);
-       while ((map = fr_dlist_next(&inst->maps, map))) {
+       while ((map = fr_map_list_next(&inst->maps, map))) {
                fr_pair_list_t  to_cache;
 
                fr_pair_list_init(&to_cache);
@@ -425,7 +425,7 @@ static unlang_action_t cache_insert(rlm_rcode_t *p_result,
                                fr_assert(0);
                        }
                        MAP_VERIFY(c_map);
-                       fr_dlist_insert_tail(&c->maps, c_map);
+                       fr_map_list_insert_tail(&c->maps, c_map);
                }
                talloc_free_children(pool); /* reset pool state */
        }
@@ -868,7 +868,7 @@ xlat_action_t cache_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out,
                return XLAT_ACTION_FAIL;
        }
 
-       while ((map = fr_dlist_next(&c->maps, map))) {
+       while ((map = fr_map_list_next(&c->maps, map))) {
                if ((tmpl_da(map->lhs) != tmpl_da(target)) ||
                    (tmpl_list(map->lhs) != tmpl_list(target))) continue;
 
@@ -1051,7 +1051,7 @@ static int mod_instantiate(module_inst_ctx_t const *mctx)
                }
        }
 
-       if (fr_dlist_empty(&inst->maps)) {
+       if (fr_map_list_empty(&inst->maps)) {
                cf_log_err(conf, "Cache config must contain an update section, and "
                              "that section must not be empty");
                return -1;
index 13f5e38b3ef86eff30f9bf37a7ec0db505a5824f..d8fc84bb8b1b0942816c9e2c04d099409704ce0e 100644 (file)
@@ -53,7 +53,7 @@ int cache_serialize(TALLOC_CTX *ctx, char **out, rlm_cache_entry_t const *c)
        /*
         *      It's valid to have an empty cache entry (save allocing the pairs pool)
         */
-       if (fr_dlist_empty(&c->maps)) goto finish;
+       if (fr_map_list_empty(&c->maps)) goto finish;
 
        value_pool = talloc_pool(ctx, 512);
        if (!value_pool) {
@@ -63,7 +63,7 @@ int cache_serialize(TALLOC_CTX *ctx, char **out, rlm_cache_entry_t const *c)
                return -1;
        }
 
-       while ((map = fr_dlist_next(&c->maps, map))) {
+       while ((map = fr_map_list_next(&c->maps, map))) {
                char    *value;
                ssize_t slen;
 
@@ -167,7 +167,7 @@ int cache_deserialize(rlm_cache_entry_t *c, fr_dict_t const *dict, char *in, ssi
                MAP_VERIFY(map);
 
                /* It's not a special attribute, add it to the map list */
-               fr_dlist_insert_tail(&c->maps, map);
+               fr_map_list_insert_tail(&c->maps, map);
 
        next:
                p = q + 1;