unlang_frame_state_xlat_t *state = talloc_get_type_abort(frame->state, unlang_frame_state_xlat_t);
xlat_exp_t const *child = NULL;
xlat_action_t xa;
- fr_value_box_t *box;
if (is_repeatable(frame)) {
xa = xlat_frame_eval_repeat(state->ctx, &state->values, &child,
* The called function can't pass us a value box,
* so we have to create it ourselves.
*/
- box = fr_value_box_alloc(state->ctx, FR_TYPE_GROUP, NULL, false);
- fr_cursor_append(&state->values, box);
+ state->rhead = fr_value_box_alloc(state->ctx, FR_TYPE_GROUP, NULL, false);
- unlang_xlat_push(state->ctx, &box->vb_group, request, child, false);
+ unlang_xlat_push(state->ctx, &state->rhead->vb_group, request, child, false);
return UNLANG_ACTION_PUSHED_CHILD;
case XLAT_ACTION_YIELD:
}
break;
+ case XLAT_CHILD:
+ {
+ fr_cursor_t from;
+
+ XLAT_DEBUG("** [%i] %s(child) - continuing %%{%s ...}", unlang_interpret_stack_depth(request), __FUNCTION__,
+ node->fmt);
+
+ rad_assert(*result != NULL);
+
+ xlat_debug_log_expansion(request, *in, NULL);
+ xlat_debug_log_result(request, *result);
+
+ (void) talloc_list_get_type_abort(*result, fr_value_box_t);
+ fr_cursor_init(&from, result);
+ fr_cursor_merge(out, &from);
+ rad_assert(!*result);
+ }
+ break;
+
default:
rad_assert(0);
return XLAT_ACTION_FAIL;
goto finish;
case XLAT_CHILD:
- XLAT_DEBUG("** [%i] %s(child) - %%{%s:...}", unlang_interpret_stack_depth(request), __FUNCTION__,
+ XLAT_DEBUG("** [%i] %s(child) - %%{%s ...}", unlang_interpret_stack_depth(request), __FUNCTION__,
node->fmt);
/*