Skip to content

Commit

Permalink
Fix map_to_request VP parenting
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed May 16, 2015
1 parent d3af960 commit 275d34d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/map.c
Expand Up @@ -1099,7 +1099,7 @@ int map_to_request(REQUEST *request, vp_map_t const *map, radius_map_getvalue_t
* VPs to work with.
*/
if (map->rhs->type != TMPL_TYPE_NULL) {
rcode = func(request, &head, request, map, ctx);
rcode = func(parent, &head, request, map, ctx);
if (rcode < 0) {
rad_assert(!head);
return rcode;
Expand All @@ -1113,15 +1113,14 @@ int map_to_request(REQUEST *request, vp_map_t const *map, radius_map_getvalue_t
}

/*
* Reparent the VPs (func may return multiple)
* Print the VPs
*/
for (vp = fr_cursor_init(&src_list, &head);
vp;
vp = fr_cursor_next(&src_list)) {
VERIFY_VP(vp);

if (rad_debug_lvl) map_debug_log(request, map, vp);
pairsteal(parent, vp);
}

/*
Expand Down

0 comments on commit 275d34d

Please sign in to comment.