TALLOC_CTX *xlat_ctx = talloc_init_const("xlat");
char *fmt = talloc_typed_strdup(xlat_ctx, input + 10);
xlat_exp_t *head = NULL;
+ xlat_flags_t flags = { };
- slen = xlat_tokenize_ephemeral_expression(xlat_ctx, &head, el, NULL,
+ slen = xlat_tokenize_ephemeral_expression(xlat_ctx, &head, el, &flags,
&FR_SBUFF_IN(fmt, talloc_array_length(fmt) - 1),
NULL,
&(tmpl_rules_t) {
continue;
}
+ if (xlat_resolve(&head, &flags, NULL) < 0) {
+ talloc_free(xlat_ctx);
+ snprintf(output, sizeof(output), "ERROR resolving xlat: %s", fr_strerror());
+ continue;
+ }
+
len = xlat_eval_compiled(output, sizeof(output), request, head, NULL, NULL);
if (len < 0) {
talloc_free(xlat_ctx);
}
*head = node;
+ xlat_flags_merge(flags, &node->flags);
+
return fr_sbuff_used(&our_in);
}
#endif
fr_assert(node != NULL);
*head = node;
+ xlat_flags_merge(flags, &node->flags);
+
return fr_sbuff_set(in, &our_in);
}