On 20 Jan 2014, at 17:24, Arran Cudbard-Bell <a.cudbardb@freeradius.org> wrote:
On 20 Jan 2014, at 15:32, Alan DeKok <aland@deployingradius.com> wrote:
John Dennis wrote:
While you're at it could you also fix the warning messages in rad_encode() (radius.c around line 1850) so they're emitted. Maybe they should be DEBUG statements instead of fr_strerror_printf() or maybe fix fr_strerror_printf(), either way it should show up when running in debug -X mode.
It's not always an error to miss encoding attributes. The call to rad_encode() succeeds, so there's no reason for the radiusd binary to print out an error. The issue is that rad_encode() calls rad_vp2attr().
and rad_vp2attr() passes back error codes from the other attribute encoders, and those encoders log errors using fr_strerror_printf(). rad_encode() doesn't call fr_strerror_printf() itself on rad_vp2attr() error, so it seems some place in the code isn't checking the return value of rad_encode().
So maybe rad_encode() should print the error string, via a DEBUG statement.
It's a library function. It shouldn't even have the DEBUG() macro available.
OK. Fixed the fr_strerror_printf() issue. See https://github.com/FreeRADIUS/freeradius-server/commit/d253c7306dc5170972dc7... Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2