* Don't re-initialize data which was already parsed.
*/
cp = cf_pair_find(cs, rule->name1);
- if (cp && cp->parsed) return 0;
+ if (cp && cp->item.parsed) return 0;
if ((rule->type != FR_TYPE_STRING) &&
(!(rule->flags & CONF_FLAG_FILE_READABLE)) &&
CONF_PAIR *cp;
cp = cf_item_to_pair(ci);
- if (cp->parsed || cp->referenced || (ci->lineno < 0)) continue;
+ if (cp->item.parsed || cp->item.referenced || (ci->lineno < 0)) continue;
WARN("%s[%d]: The item '%s' is defined, but is unused by the configuration",
ci->filename, ci->lineno,
new = cf_pair_alloc(parent, cp->attr, cf_pair_value(cp), cp->op, cp->lhs_quote, cp->rhs_quote);
if (!new) return NULL;
- if (copy_meta) new->parsed = cp->parsed;
+ if (copy_meta) {
+ new->item.parsed = cp->item.parsed;
+ new->item.referenced = cp->item.referenced;
+ }
cf_lineno_set(new, cp->item.lineno);
cf_filename_set(new, cp->item.filename);
*/
void cf_pair_mark_parsed(CONF_PAIR *cp)
{
- cp->parsed = true;
+ cp->item.parsed = true;
}
/** Return whether a pair has already been parsed
*/
bool cf_pair_is_parsed(CONF_PAIR *cp)
{
- return cp->parsed;
+ return cp->item.parsed;
}
/** Return the first child that's a #CONF_PAIR
DEBUG(" lhs_quote : %s", fr_table_str_by_value(fr_token_quotes_table, cp->lhs_quote, "<INVALID>"));
DEBUG(" rhs_quote : %s", fr_table_str_by_value(fr_token_quotes_table, cp->rhs_quote, "<INVALID>"));
DEBUG(" pass2 : %s", cp->pass2 ? "yes" : "no");
- DEBUG(" parsed : %s", cp->parsed ? "yes" : "no");
+ DEBUG(" parsed : %s", cp->item.parsed ? "yes" : "no");
}
break;