Skip to content

Commit

Permalink
use radius_pairmove(), which does the same thing and more
Browse files Browse the repository at this point in the history
in an attempt to get rid of old / duplicate APIs
  • Loading branch information
alandekok committed Nov 8, 2023
1 parent aad4add commit b95bd75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/modules/rlm_exec/rlm_exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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 */
}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/rlm_files/rlm_files.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ static unlang_action_t file_common(rlm_rcode_t *p_result, UNUSED rlm_files_t con
/*
* 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)) {
Expand Down

0 comments on commit b95bd75

Please sign in to comment.