tmpl_t const *vpt; //!< expanded tmpl
tmpl_t *to_free; //!< tmpl to free.
bool create; //!< whether we need to create the VP
+ bool success; //!< did the xlat succeed?
fr_pair_t *vp; //!< VP referenced by tmpl.
fr_pair_t *vp_parent; //!< parent of the current VP
fr_pair_list_t pair_list; //!< for structural attributes
return 1;
case TMPL_TYPE_XLAT:
- if (unlang_xlat_push(ctx, NULL, &out->result, request, tmpl_xlat(vpt), false) < 0) return -1;
+ if (unlang_xlat_push(ctx, &out->success, &out->result, request, tmpl_xlat(vpt), false) < 0) return -1;
return 1;
default:
{
map_t const *map = current->map;
+ if (!current->rhs.success) {
+ if (map->rhs) {
+ RDEBUG("Failed expanding ... %s", map->rhs->name);
+ } else {
+ RDEBUG("Failed assigning to %s", map->lhs->name);
+ }
+ return -1;
+ }
+
XDEBUG("%s map %s %s ...", __FUNCTION__, map->lhs->name, fr_tokens[map->op]);
/*
XDEBUG("MAP %s ... %s", state->current->map->lhs->name, state->current->map->rhs->name);
}
+ state->current->lhs.success = state->current->rhs.success = true;
+
rcode = state->current->func(request, state, state->current);
if (rcode < 0) {
RINDENT_RESTORE(request, state);