/*
* Error functions.
*/
-#ifdef _LIBRADIUS
void fr_strerror_printf(char const *, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 1, 2)))
#endif
;
-#endif
void fr_perror(char const *, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 1, 2)))
vpt->request = radius_request_name(&p, request_def);
len = p - name;
if (vpt->request == REQUEST_UNKNOWN) {
- ERROR("Invalid request qualifier \"%.*s\"", (int) len, name);
+ fr_strerror_printf("Invalid request qualifier \"%.*s\"", (int) len, name);
return -1;
}
name += len;
vpt->list = radius_list_name(&p, list_def);
if (vpt->list == PAIR_LIST_UNKNOWN) {
len = p - name;
- ERROR("Invalid list qualifier \"%.*s\"", (int) len, name);
+ fr_strerror_printf("Invalid list qualifier \"%.*s\"", (int) len, name);
return -1;
}
if (!da) {
da = dict_attrunknownbyname(p, false);
if (!da) {
- ERROR("Unknown attribute \"%s\"", p);
+ fr_strerror_printf("Unknown attribute \"%s\"", p);
return -1;
}
}
copy = talloc_strdup(vpt, name);
if (radius_parse_attr(vpt, copy, request_def, list_def) < 0) {
+ ERROR("%s", fr_strerror());
radius_tmplfree(&vpt);
return NULL;
}
}
-/** Convert strings to value_pair_map_e
+/** Convert strings to value_pair_map_t
*
* Treatment of operands depends on quotation, barewords are treated
* as attribute references, double quoted values are treated as
value_pair_map_t *old;
value_pair_tmpl_t vpt;
+ old = c->data.map;
+
/*
* It's still not an attribute. Ignore it.
*/
if (radius_parse_attr(&vpt, map->dst->name, REQUEST_CURRENT, PAIR_LIST_REQUEST) < 0) {
+ cf_log_err(old->ci, "Failed parsing condition: %s", fr_strerror());
c->pass2_fixup = PASS2_FIXUP_NONE;
return true;
}
/*
* Re-parse the LHS as an attribute.
*/
- old = c->data.map;
map = radius_str2map(c, old->dst->name, T_BARE_WORD, old->op,
old->src->name, T_BARE_WORD,
REQUEST_CURRENT, PAIR_LIST_REQUEST,