Prevent assert(0) in rlm_rest
authorHerwin Weststrate <herwin@quarantainenet.nl>
Tue, 7 Oct 2014 15:59:54 +0000 (17:59 +0200)
committerHerwin Weststrate <herwin@quarantainenet.nl>
Tue, 7 Oct 2014 16:05:41 +0000 (18:05 +0200)
commitf15bee50d818883c8299d2abd1c3fce910b41848
treec50eca1a3313bb9cf064dd204f3452c07342749a
parent9315703698240cbe03accaced3e1985f3c8ef1aa
Prevent assert(0) in rlm_rest

If the RADIUS server is compiled without JSON support, it is still possible that the other end of the rlm_rest module returns JSON. This triggered an "assert(0)" and crashed the server. This fixes this by printing an error message to indicate that the reply of the REST server couldn't be parsed, and failing the module gracefully.
src/modules/rlm_rest/rest.c