]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
set more flags correctly
authorAlan T. DeKok <aland@freeradius.org>
Mon, 23 May 2022 20:27:26 +0000 (16:27 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 24 May 2022 20:46:46 +0000 (16:46 -0400)
src/lib/unlang/xlat_tokenize.c

index c7442b86914c818406cb72e7efb9228f4038de3a..8d8082f0d3194b23804168dca6fe6fd2737ef4d5 100644 (file)
@@ -379,6 +379,13 @@ static inline int xlat_tokenize_function_mono(xlat_exp_head_t *head,
        }
 
        xlat_flags_merge(&node->flags, &node->call.args->flags);
+
+       if (!func) {
+               node->flags.can_purify = node->call.args->flags.can_purify;
+       } else {
+               node->flags.can_purify = (node->call.func->flags.pure && node->call.args->flags.pure) | node->call.args->flags.can_purify;
+       }
+
        xlat_exp_insert_tail(head, node);
 
        return 0;