summaryrefslogtreecommitdiff
path: root/accel-pppd/radius/acct.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/radius/acct.c')
-rw-r--r--accel-pppd/radius/acct.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/accel-pppd/radius/acct.c b/accel-pppd/radius/acct.c
index d6f2b182..de8ce286 100644
--- a/accel-pppd/radius/acct.c
+++ b/accel-pppd/radius/acct.c
@@ -303,15 +303,15 @@ out_err:
static void rad_acct_stop_sent(struct rad_req_t *req, int res)
{
if (res) {
- if (req->rpd)
+ if (ap_shutdown) {
+ struct radius_pd_t *rpd = req->rpd;
+
+ rad_req_free(req);
+
+ if (rpd)
+ rpd->acct_req = NULL;
+ } else if (req->rpd)
rad_acct_stop_defer(req->rpd);
- else {
- if (ap_shutdown) {
- rad_req_free(req);
- req->rpd->acct_req = NULL;
- } else
- req->try = 0;
- }
return;
}
@@ -348,6 +348,8 @@ static void rad_acct_stop_timeout(struct triton_timer_t *t)
{
struct rad_req_t *req = container_of(t, typeof(*req), timeout);
+ log_debug("timeout %p\n", req);
+
if (!req->rpd)
log_switch(triton_context_self(), NULL);