talloc_free(p);
}
-/** Add a module failure message fr_pair_tE to the request
- *
- * @param[in] request The current request.
- * @param[in] fmt with printf style substitution tokens.
- * @param[in] ... Substitution arguments.
- */
-void log_module_failure_msg(request_t *request, char const *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- vlog_module_failure_msg(request, fmt, ap);
- va_end(ap);
-}
-
/** Marshal variadic log arguments into a va_list and pass to normal logging functions
*
* @see log_request_error for more details.
char const *fmt, ...)
CC_HINT(format (printf, 6, 7)) CC_HINT(nonnull (3, 6));
-void log_module_failure_msg(request_t *request, char const *fmt, ...)
- CC_HINT(format (printf, 2, 3));
-
void vlog_module_failure_msg(request_t *request, char const *fmt, va_list ap)
CC_HINT(format (printf, 2, 0));
if (status > 9) {
REDEBUG("Program returned invalid code (greater than max rcode) (%i > 9): %pV",
status, box);
- goto fail;
+ return RLM_MODULE_FAIL;
}
rcode = status2rcode[status];
if (rcode == RLM_MODULE_FAIL) {
- fail:
-
- if (box) log_module_failure_msg(request, "%pV", box);
+ if (box) RDEBUG(request, "Program failed with output: %pV", box);
return RLM_MODULE_FAIL;
}