fr_dict_attr_t const *da;
if (!vpt->tmpl_da->flags.has_tag &&
- (vpt->tmpl_tag != TAG_ANY)) {
+ TAG_VALID_ZERO(vpt->tmpl_tag)) {
FR_FAULT_LOG("CONSISTENCY CHECK FAILED %s[%u]: TMPL_TYPE_ATTR "
"da is marked as not having a tag, but the template has a tag",
file, line);
#if 0
if (vpt->tmpl_da->flags.has_tag &&
- (vpt->tmpl_tag == TAG_ANY)) {
+ !TAG_VALID_ZERO(vpt->tmpl_tag)) {
FR_FAULT_LOG("CONSISTENCY CHECK FAILED %s[%u]: TMPL_TYPE_ATTR "
- "da is marked as having a tag, but the template has no tag",
+ "da is marked as not having a tag, but the template has an invalid tag",
file, line);
if (!fr_cond_assert(0)) fr_exit_now(1);
}
*(p++) = '%';
*(p++) = '{';
+ /*
+ * @todo - just call tmpl_snprint() ??
+ */
if (node->attr->tmpl_request != REQUEST_CURRENT) {
strlcpy(p, fr_int2str(request_refs, node->attr->tmpl_request, "??"), end - p);
p += strlen(p);
strlcpy(p, node->attr->tmpl_da->name, end - p);
p += strlen(p);
- if (node->attr->tmpl_tag != TAG_ANY) {
+ if (TAG_VALID(node->attr->tmpl_tag)) {
*(p++) = ':';
- snprintf(p, end - p, "%u", node->attr->tmpl_tag);
+ snprintf(p, end - p, "%d", node->attr->tmpl_tag);
p += strlen(p);
}