char const *fmt; //!< The format string.
size_t len; //!< Length of the format string.
+ bool async_safe; //!< carried from all of the children
+
xlat_state_t type; //!< type of this expansion.
xlat_exp_t *next; //!< Next in the list.
p += slen;
}
+ node->async_safe = (node->child->async_safe && node->alternate->async_safe);
+
*head = node;
return p - fmt;
}
}
p += slen;
+ node->async_safe = (node->xlat->async_safe && node->child->async_safe);
*head = node;
rad_assert(node->next == NULL);
node->fmt = node->attr->tmpl_unknown_name;
XLAT_DEBUG("VIRTUAL <-- %s", node->fmt);
+ node->async_safe = node->xlat->async_safe;
*head = node;
rad_assert(node->next == NULL);
q++;
return -1; /* second character of format string */
}
*p++ = '\0';
+ node->async_safe = true; /* attribute expansions are always async-safe */
*head = node;
rad_assert(node->next == NULL);
* Squash zero-width literals
*/
if (node->len > 0) {
+ node->async_safe = true; /* literals are always true */
*head = node;
} else {
/*
* Zero length expansion, return a zero length node.
*/
- if (slen == 0) *head = talloc_zero(ctx, xlat_exp_t);
+ if (slen == 0) {
+ MEM(*head = talloc_zero(ctx, xlat_exp_t));
+ (*head)->async_safe = true;
+ }
/*
* Output something like: