]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove xlat_sync_required()
authorAlan T. DeKok <aland@freeradius.org>
Fri, 16 Dec 2022 14:33:25 +0000 (09:33 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 21 Dec 2022 17:49:17 +0000 (12:49 -0500)
synchronous xlats now call unlang_interpret_synchronous(), and
thus can deal with async xlats

src/lib/server/tmpl_tokenize.c
src/lib/unlang/xlat.h
src/lib/unlang/xlat_eval.c

index 4f8180d427c37a8155ef7a90cedbc28fd7a4dab1..c25fd829ddde564ae3b1f25bbad32d48377669c8 100644 (file)
@@ -5531,9 +5531,7 @@ bool tmpl_async_required(tmpl_t const *vpt)
 #ifndef HAVE_REGEX
        case TMPL_TYPE_REGEX_XLAT:
 #endif
-       case TMPL_TYPE_XLAT:
-               return xlat_async_required(tmpl_xlat(vpt));
-
+       case TMPL_TYPE_XLAT:    /* synchronous xlats use unlang_interpret_synchronous() */
        default:
                return false;
        }
index 1465ef04718b2d8ffb5f4f880b2244d2fc5c4e27..8f44322f9c53defa240a2d270e1106aab86a78b4 100644 (file)
@@ -384,9 +384,6 @@ int         xlat_aeval_compiled_argv(TALLOC_CTX *ctx, char ***argv, request_t *request,
 
 int            xlat_flatten_compiled_argv(TALLOC_CTX *ctx, xlat_exp_head_t ***argv, xlat_exp_head_t *head);
 
-bool           xlat_async_required(xlat_exp_head_t const *xlat);
-
-
 fr_slen_t      xlat_tokenize_expression(TALLOC_CTX *ctx, xlat_exp_head_t **head, fr_sbuff_t *in,
                                         fr_sbuff_parse_rules_t const *p_rules, tmpl_rules_t const *t_rules);
 
index 75f8c23410dd5415a4a09cdc0dde98bb287d8906..acc815d70c3a47254952cae3ef7bf5e0fd6a6287 100644 (file)
@@ -1694,17 +1694,3 @@ void xlat_eval_free(void)
 
        done_init = false;
 }
-
-/** Return whether or not async is required for this xlat.
- *
- *     If the xlat is needs_async, then it MAY yield
- *     If the xlat is not needs_async, then it will NOT yield
- *
- *     If the xlat yields, then async is required.
- */
-bool xlat_async_required(xlat_exp_head_t const *head)
-{
-       if (!head) return false;
-
-       return head->flags.needs_async;
-}