* Fixme maybe?.. Can't have a section and pair with the same name.
*/
if (!_cf_data_add_static(CF_TO_ITEM(cs), rule, "CONF_PARSER", rule->name, filename, lineno)) {
+ CONF_DATA const *cd;
CONF_PARSER const *old;
- old = cf_data_value(cf_data_find(CF_TO_ITEM(cs), CONF_PARSER, rule->name));
+ cd = cf_data_find(CF_TO_ITEM(cs), CONF_PARSER, rule->name);
+ old = cf_data_value(cd);
rad_assert(old != NULL);
/*
return 0;
}
+ cf_log_err(cs, "Data of type %s with name \"%s\" already exists. Existing data added %s[%i]", "CONF_PARSER",
+ rule->name, cd->item.filename, cd->item.lineno);
+
cf_debug(cs);
return -1;
}
*/
found = _cf_data_find(ci, type, name);
if (found) {
- cf_log_err(ci, "Data of type %s with name \"%s\" already exists. Existing data added %s[%i]", type,
- name, found->item.filename, found->item.lineno);
return NULL;
}