]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
use radius_pairmove(), which does the same thing and more
authorAlan T. DeKok <aland@freeradius.org>
Wed, 8 Nov 2023 15:17:56 +0000 (16:17 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 8 Nov 2023 16:07:03 +0000 (17:07 +0100)
in an attempt to get rid of old / duplicate APIs

src/modules/rlm_exec/rlm_exec.c
src/modules/rlm_files/rlm_files.c

index 7c4e94005be15208a260bb5b11d8fcf943973f15..50b45669a5114c2ddb1dfeeee3f7bbfb8a020286 100644 (file)
@@ -35,7 +35,7 @@ RCSID("$Id$")
 #include <freeradius-devel/server/main_config.h>
 #include <freeradius-devel/unlang/interpret.h>
 #include <freeradius-devel/util/debug.h>
-#include <freeradius-devel/util/pair_legacy.h>
+#include <freeradius-devel/server/pairmove.h>
 #include <freeradius-devel/unlang/xlat_func.h>
 #include <freeradius-devel/unlang/xlat.h>
 #include <freeradius-devel/unlang/module.h>
@@ -289,7 +289,7 @@ static unlang_action_t mod_exec_oneshot_wait_resume(rlm_rcode_t *p_result, modul
                        ctx = tmpl_list_ctx(request, tmpl_list(inst->output_list));
 
                        fr_pair_list_afrom_box(ctx, &vps, request->dict, box);
-                       if (!fr_pair_list_empty(&vps)) fr_pair_list_move_op(output_pairs, &vps, T_OP_ADD_EQ);
+                       if (!fr_pair_list_empty(&vps)) radius_pairmove(request, output_pairs, &vps);
 
                        fr_value_box_list_talloc_free(&m->box); /* has been consumed */
                }
index 72ead5da6a9b30ec1ef6c292c913b87e4e1b7914..a6cb239151810905052253926e34d2103021becf 100644 (file)
@@ -564,7 +564,7 @@ redo:
                /*
                 *      Move the control items over, too.
                 */
-               fr_pair_list_move_op(&request->control_pairs, &list, T_OP_ADD_EQ);
+               radius_pairmove(request, &request->control_pairs, &list);
 
                /* ctx may be reply */
                if (!map_list_empty(&pl->reply)) {