if (inst->locking && !locked) {
close(outfd);
- radlog(L_ERR, "rlm_detail: Failed to aquire filelock for %s, giving up",
+ radlog(L_ERR, "rlm_detail: Failed to acquire filelock for %s, giving up",
buffer);
return RLM_MODULE_FAIL;
}
*/
static int detail_accounting(void *instance, REQUEST *request)
{
+ if (request->listener->type == RAD_LISTEN_DETAIL) {
+ DEBUG2(" rlm_detail: Suppressing writes to detail file as the request was just read from a detail file.");
+ return RLM_MODULE_NOOP;
+ }
return do_detail(instance,request,request->packet, TRUE);
}
return do_detail(instance,request,request->proxy_reply, FALSE);
}
+ /*
+ * No reply: we must be doing Post-Proxy-Type = Fail.
+ *
+ * Note that we just call the normal accounting function,
+ * to minimize the amount of code, and to highlight that
+ * it's doing normal accounting.
+ */
+ if (!request->proxy_reply) {
+ return detail_accounting(instance, request);
+ }
+
return RLM_MODULE_NOOP;
}