]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
more fr_map_list fixes
authorAlan T. DeKok <aland@freeradius.org>
Fri, 10 Dec 2021 19:03:16 +0000 (14:03 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 10 Dec 2021 19:03:16 +0000 (14:03 -0500)
src/modules/rlm_json/rlm_json.c
src/modules/rlm_ldap/rlm_ldap.c
src/modules/rlm_radius/rlm_radius.c
src/modules/rlm_radius/rlm_radius_udp.c
src/modules/rlm_sql/rlm_sql.c

index f73f0f3035b1722f2e5062af72d1c14b0c4dbcf5..b233f6c46244410150387dcda560255dd6dca56e 100644 (file)
@@ -292,7 +292,7 @@ static int mod_map_proc_instantiate(CONF_SECTION *cs, UNUSED void *mod_inst, voi
                return -1;
        }
 
-       while ((map = fr_dlist_next(maps, map))) {
+       while ((map = fr_map_list_next(maps, map))) {
                CONF_PAIR       *cp = cf_item_to_pair(map->ci);
                char const      *p;
 
@@ -343,7 +343,7 @@ static int mod_map_proc_instantiate(CONF_SECTION *cs, UNUSED void *mod_inst, voi
                 *      list member was pre-allocated and passed to the
                 *      instantiation callback.
                 */
-               if (fr_dlist_next(maps, map)) {
+               if (fr_map_list_next(maps, map)) {
                        *tail = cache = talloc_zero(cache, rlm_json_jpath_cache_t);
                        tail = &cache->next;
                }
@@ -454,7 +454,7 @@ static rlm_rcode_t mod_map_proc(UNUSED void *mod_inst, void *proc_inst, request_
                goto finish;
        }
 
-       while ((map = fr_dlist_next(maps, map))) {
+       while ((map = fr_map_list_next(maps, map))) {
                switch (map->rhs->type) {
                /*
                 *      Cached types
index 6bcb6379e0ddae299aea1497d8e2075af12220e2..cb272bdf5d22bf45d20f39c4d5a3cc1fd950ef47 100644 (file)
@@ -833,9 +833,9 @@ static rlm_rcode_t mod_map_proc(void *mod_inst, UNUSED void *proc_inst, request_
                }
 
                RINDENT();
-               for (map = fr_dlist_head(maps), i = 0;
+               for (map = fr_map_list_head(maps), i = 0;
                     map != NULL;
-                    map = fr_dlist_next(maps, map), i++) {
+                    map = fr_map_list_next(maps, map), i++) {
                        int                     ret;
                        fr_ldap_result_t        attr;
 
@@ -1418,7 +1418,7 @@ skip_edir:
                }
        }
 
-       if (!fr_dlist_empty(&inst->user_map) || inst->valuepair_attr) {
+       if (!fr_map_list_empty(&inst->user_map) || inst->valuepair_attr) {
                RDEBUG2("Processing user attributes");
                RINDENT();
                if (fr_ldap_map_do(request, handle, inst->valuepair_attr,
index 039927ceebd79d838d4cad3d4be12e8451f17b3d..6f9e27f0dd31ee296aa7c1957683e21f68961c16 100644 (file)
@@ -349,7 +349,7 @@ static int status_check_update_parse(TALLOC_CTX *ctx, void *out, UNUSED void *pa
 
                rcode = map_afrom_cs(ctx, head, cs, &parse_rules, &parse_rules, unlang_fixup_update, NULL, 128);
                if (rcode < 0) return -1; /* message already printed */
-               if (fr_dlist_empty(head)) {
+               if (fr_map_list_empty(head)) {
                        cf_log_err(cs, "'update' sections cannot be empty");
                        return -1;
                }
index 3ffac7ef7c35b5246da577486747f982915ba164..b5e3a39721a0402ac74c3e39316a45cced152bd6 100644 (file)
@@ -370,7 +370,7 @@ static void CC_HINT(nonnull) status_check_alloc(udp_handle_t *h)
         *      Create the VPs, and ignore any errors
         *      creating them.
         */
-       while ((map = fr_dlist_next(&inst->parent->status_check_map, map))) {
+       while ((map = fr_map_list_next(&inst->parent->status_check_map, map))) {
                /*
                 *      Skip things which aren't attributes.
                 */
index 942e28c7981392a1c2c353168405f67600870f66..c672e411a77c6004739c51e218e7eb1a35094cbd 100644 (file)
@@ -486,9 +486,9 @@ static rlm_rcode_t mod_map_proc(void *mod_inst, UNUSED void *proc_inst, request_
         *      faster than building a radix tree each time the
         *      map set is evaluated (map->rhs can be dynamic).
         */
-       for (map = fr_dlist_head(maps), i = 0;
+       for (map = fr_map_list_head(maps), i = 0;
             map && (i < MAX_SQL_FIELD_INDEX);
-            map = fr_dlist_next(maps, map), i++) {
+            map = fr_map_list_next(maps, map), i++) {
                /*
                 *      Expand the RHS to get the name of the SQL field
                 */
@@ -525,9 +525,9 @@ static rlm_rcode_t mod_map_proc(void *mod_inst, UNUSED void *proc_inst, request_
         */
        while (((ret = rlm_sql_fetch_row(&row, inst, request, &handle)) == RLM_SQL_OK)) {
                rows++;
-               for (map = fr_dlist_head(maps), j = 0;
+               for (map = fr_map_list_head(maps), j = 0;
                     map && (j < MAX_SQL_FIELD_INDEX);
-                    map = fr_dlist_next(maps, map), j++) {
+                    map = fr_map_list_next(maps, map), j++) {
                        if (field_index[j] < 0) continue;       /* We didn't find the map RHS in the field set */
                        if (map_to_request(request, map, _sql_map_proc_get_value, row[field_index[j]]) < 0) goto error;
                }