Skip to content

Commit

Permalink
walk over the list of child xlat nodes, too
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Apr 10, 2020
1 parent bb25b9d commit a43765f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/lib/unlang/xlat_eval.c
Expand Up @@ -1853,5 +1853,18 @@ void xlat_eval_free(void)
*/
bool xlat_async_required(xlat_exp_t const *xlat)
{
return !xlat->async_safe;
xlat_exp_t const *node;

if (xlat->type != XLAT_CHILD) {
return !xlat->async_safe;
}

/*
* Set async_safe on the entire list.
*/
for (node = xlat; node != NULL; node = node->next) {
if (!node->async_safe) return true;
}

return false;
}

0 comments on commit a43765f

Please sign in to comment.