]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
pure functions cannot require async resolution
authorAlan T. DeKok <aland@freeradius.org>
Tue, 23 Nov 2021 17:26:38 +0000 (12:26 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 23 Nov 2021 17:26:38 +0000 (12:26 -0500)
they must operate only on things in memory

src/lib/unlang/xlat_tokenize.c

index 33065b12ebf5b780ee19334174beca2fe7430c85..ff2ab693af8d0ff211c35fe213a02069a0d40562 100644 (file)
@@ -202,6 +202,7 @@ static inline CC_HINT(always_inline) void xlat_flags_merge(xlat_flags_t *parent,
        parent->needs_async |= child->needs_async;
        parent->needs_resolving |= child->needs_resolving;
        parent->pure &= child->pure; /* purity can only be removed, never added */
+       parent->pure &= !parent->needs_async; /* things needing async cannot be pure */
 }
 
 /** Free a linked list of xlat nodes