]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
no need to pass flags here
authorAlan T. DeKok <aland@freeradius.org>
Wed, 11 May 2022 13:55:16 +0000 (09:55 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 16 May 2022 19:00:17 +0000 (15:00 -0400)
src/bin/unit_test_module.c
src/lib/unlang/xlat_builtin.c

index 8326882713c7935488a86c0d4a580413dacb5e82..296ddc247aead5efe97830026278453efaf55928 100644 (file)
@@ -420,9 +420,8 @@ static bool do_xlats(fr_event_list_t *el, char const *filename, FILE *fp)
                        TALLOC_CTX              *xlat_ctx = talloc_init_const("xlat");
                        char                    *fmt = talloc_typed_strdup(xlat_ctx, input + 10);
                        xlat_exp_head_t         *head = NULL;
-                       xlat_flags_t            flags = { };
 
-                       slen = xlat_tokenize_ephemeral_expression(xlat_ctx, &head, el, &flags,
+                       slen = xlat_tokenize_ephemeral_expression(xlat_ctx, &head, el, NULL,
                                                                  &FR_SBUFF_IN(fmt, talloc_array_length(fmt) - 1),
                                                                  NULL,
                                                                  &(tmpl_rules_t) {
@@ -446,7 +445,7 @@ static bool do_xlats(fr_event_list_t *el, char const *filename, FILE *fp)
                                continue;
                        }
 
-                       if (xlat_resolve(head, &flags, NULL) < 0) {
+                       if (xlat_resolve(head, NULL, NULL) < 0) {
                                talloc_free(xlat_ctx);
                                snprintf(output, sizeof(output), "ERROR resolving xlat: %s", fr_strerror());
                                continue;
index e08e1a382cc7f2e668409767f7ff6debea9ff4ba..5bc55584ff37fe7bc582758dafcbae43457dafa1 100644 (file)
@@ -1557,8 +1557,6 @@ static xlat_action_t xlat_func_eval(TALLOC_CTX *ctx, fr_dcursor_t *out,
                                    UNUSED xlat_ctx_t const *xctx,
                                    request_t *request, fr_value_box_list_t *in)
 {
-
-       xlat_flags_t            flags = {};
        xlat_eval_rctx_t        *rctx;
        fr_value_box_t          *arg = fr_dlist_head(in);
 
@@ -1587,7 +1585,7 @@ static xlat_action_t xlat_func_eval(TALLOC_CTX *ctx, fr_dcursor_t *out,
         *      Parse the input as a literal expansion
         */
        if (xlat_tokenize_ephemeral(rctx,
-                                   &rctx->ex, unlang_interpret_event_list(request), &flags,
+                                   &rctx->ex, unlang_interpret_event_list(request), NULL,
                                    &FR_SBUFF_IN(arg->vb_strvalue, arg->vb_length),
                                    &(fr_sbuff_parse_rules_t){
                                        .escapes = &escape_rules
@@ -1612,8 +1610,8 @@ static xlat_action_t xlat_func_eval(TALLOC_CTX *ctx, fr_dcursor_t *out,
         *      good errors about what function was
         *      unresolved.
         */
-       if (flags.needs_resolving &&
-           (xlat_resolve(rctx->ex, &flags, &(xlat_res_rules_t){ .allow_unresolved = false }) < 0)) {
+       if (rctx->ex->flags.needs_resolving &&
+           (xlat_resolve(rctx->ex, NULL, &(xlat_res_rules_t){ .allow_unresolved = false }) < 0)) {
                RPEDEBUG("Unresolved expansion functions in expansion");
                goto error;