.\" File automatically generated by doxy2man0.3 .\" Generation date: Thu Sep 3 2026 .TH radcli_avp_list_error 3 2026-09-03 "radcli" "Radius client library" .SH "NAME" radcli_avp_list_error \- Check whether any radcli_avp_add_*()/_by_num() call on list has ever failed. .SH SYNOPSIS .nf .B #include .sp \fBint radcli_avp_list_error\fP( \fBconst radcli_avp_list *\fP\fIlist\fP ); .fi .SH DESCRIPTION .PP Once any add call on a given list fails, the list remembers it (sticky the first failure, not just the most recent). This lets a caller build a whole request as a flat sequence of add calls with no per-call check, then check once, here, before sending instead of the ~6-line "if (radcli_avp_add_...(...) != 0) { log; abort; }" block repeated at every call site, which has only one realistic recovery action (abort the whole request) regardless of which attribute failed to add. .PP Purely observational: it does not change any radcli_avp_add_*()'s own behavior. Every add call is attempted and returns its own 0/-1 exactly as it would without this function existing, even after an earlier add on the same list has already failed a caller checking each call individually (or deliberately testing that one bad attribute is rejected before adding others, as tests/avp.c does) sees no difference. This function only adds a second, aggregate way to notice a failure that already happened, for a caller that would rather check once than at every call site. .SH PARAMETERS .TP .B list the list to check; NULL counts as an error (nothing to build onto), matching how every radcli_avp_add_*() already treats a NULL list as failure so a caller does not need a separate if (list == NULL) check right after radcli_avp_list_new() before relying on this. .SH RETURN VALUE .PP non-zero if list is NULL or any add call on it has ever failed, 0 otherwise. .SH SEE ALSO .PP .nh .ad l \fIradcli_avp_add_bytes\fP(3), \fIradcli_avp_add_bytes_by_num\fP(3), \fIradcli_avp_add_gigawords64\fP(3), \fIradcli_avp_add_gigawords64_by_num\fP(3), \fIradcli_avp_add_ip4\fP(3), \fIradcli_avp_add_ip4_by_num\fP(3), \fIradcli_avp_add_ip4prefix\fP(3), \fIradcli_avp_add_ip4prefix_by_num\fP(3), \fIradcli_avp_add_ip6\fP(3), \fIradcli_avp_add_ip6_by_num\fP(3), \fIradcli_avp_add_str\fP(3), \fIradcli_avp_add_str_by_num\fP(3), \fIradcli_avp_add_uint32\fP(3), \fIradcli_avp_add_uint32_by_num\fP(3), \fIradcli_avp_add_uint64\fP(3), \fIradcli_avp_add_uint64_by_num\fP(3), \fIradcli_avp_add_username\fP(3), \fIradcli_avp_concat_str\fP(3), \fIradcli_avp_concat_str_by_num\fP(3), \fIradcli_avp_def\fP(3), \fIradcli_avp_get\fP(3), \fIradcli_avp_get_by_num\fP(3), \fIradcli_avp_get_bytes\fP(3), \fIradcli_avp_get_bytes_by_num\fP(3), \fIradcli_avp_get_cstr\fP(3), \fIradcli_avp_get_cstr_by_num\fP(3), \fIradcli_avp_get_gigawords64\fP(3), \fIradcli_avp_get_gigawords64_by_num\fP(3), \fIradcli_avp_get_ip4prefix\fP(3), \fIradcli_avp_get_ip4prefix_by_num\fP(3), \fIradcli_avp_get_ip6\fP(3), \fIradcli_avp_get_ip6_by_num\fP(3), \fIradcli_avp_get_uint32\fP(3), \fIradcli_avp_get_uint32_by_num\fP(3), \fIradcli_avp_get_uint64\fP(3), \fIradcli_avp_get_uint64_by_num\fP(3), \fIradcli_avp_iter_next\fP(3), \fIradcli_avp_list_free\fP(3), \fIradcli_avp_list_iter\fP(3), \fIradcli_avp_list_new\fP(3) .ad .hy