]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Allow redis xlat to emit FR_TYPE_NULL again
authorNick Porter <nick@portercomputing.co.uk>
Thu, 24 Jul 2025 11:15:24 +0000 (12:15 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 24 Jul 2025 12:32:16 +0000 (13:32 +0100)
Now that this can be handled by `map list`

src/modules/rlm_redis/rlm_redis.c

index 067d9f0184f06409221dafe7e060db0abc576841..6521d08d88511f6e055114742afd0f2217d4da19 100644 (file)
@@ -555,12 +555,10 @@ static xlat_action_t redis_lua_func_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out,
 
        if (vb_out->type == FR_TYPE_GROUP) {
                fr_value_box_t  *child_vb = NULL;
-               while ((child_vb = fr_value_box_list_pop_head(&vb_out->vb_group))) {
-                       if (child_vb->type != FR_TYPE_NULL) fr_dcursor_append(out, child_vb);
-               }
+               while ((child_vb = fr_value_box_list_pop_head(&vb_out->vb_group))) fr_dcursor_append(out, child_vb);
                talloc_free(vb_out);
        } else {
-               if (vb_out->type != FR_TYPE_NULL) fr_dcursor_append(out, vb_out);
+               fr_dcursor_append(out, vb_out);
        }
 
 finish:
@@ -776,12 +774,10 @@ reply_parse:
 
        if (vb_out->type == FR_TYPE_GROUP) {
                fr_value_box_t  *child_vb = NULL;
-               while ((child_vb = fr_value_box_list_pop_head(&vb_out->vb_group))) {
-                       if (child_vb->type != FR_TYPE_NULL) fr_dcursor_append(out, child_vb);
-               }
+               while ((child_vb = fr_value_box_list_pop_head(&vb_out->vb_group))) fr_dcursor_append(out, child_vb);
                talloc_free(vb_out);
        } else {
-               if (vb_out->type != FR_TYPE_NULL) fr_dcursor_append(out, vb_out);
+               fr_dcursor_append(out, vb_out);
        }
 
 finish: