From: Alan T. DeKok Date: Fri, 10 Dec 2021 18:01:52 +0000 (-0500) Subject: fix this, too X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec2453660d9317fd6759464b2c869ac2c0a24bac;p=thirdparty%2Ffreeradius-server.git fix this, too --- diff --git a/src/modules/rlm_cache/rlm_cache.c b/src/modules/rlm_cache/rlm_cache.c index 25a492bca02..0afe721de12 100644 --- a/src/modules/rlm_cache/rlm_cache.c +++ b/src/modules/rlm_cache/rlm_cache.c @@ -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; diff --git a/src/modules/rlm_cache/serialize.c b/src/modules/rlm_cache/serialize.c index 13f5e38b3ef..d8fc84bb8b1 100644 --- a/src/modules/rlm_cache/serialize.c +++ b/src/modules/rlm_cache/serialize.c @@ -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;