summaryrefslogtreecommitdiff
path: root/accel-pppd/radius
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-08-01 17:47:36 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-08-01 17:47:36 +0400
commitffa229d08ddc026433645dee724276a0a850708c (patch)
treef1924ddc525ad52713fea8bc265522ddf27ac5e0 /accel-pppd/radius
parentaa53abbed4e1f833ee64e2a4d4b36e9b4175775a (diff)
downloadaccel-ppp-ffa229d08ddc026433645dee724276a0a850708c.tar.gz
accel-ppp-ffa229d08ddc026433645dee724276a0a850708c.zip
radius: close socket after receiving accounting response
Diffstat (limited to 'accel-pppd/radius')
-rw-r--r--accel-pppd/radius/acct.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/accel-pppd/radius/acct.c b/accel-pppd/radius/acct.c
index fc4cae8a..698fa22d 100644
--- a/accel-pppd/radius/acct.c
+++ b/accel-pppd/radius/acct.c
@@ -348,23 +348,18 @@ out:
#ifdef USE_BACKUP
}
#endif
+ close(rpd->acct_req->hnd.fd);
+ rpd->acct_req->hnd.fd = -1;
rpd->acct_req->hnd.read = rad_acct_read;
- triton_md_register_handler(rpd->ses->ctrl->ctx, &rpd->acct_req->hnd);
- if (triton_md_enable_handler(&rpd->acct_req->hnd, MD_MODE_READ))
- goto out_err;
-
rpd->acct_req->timeout.expire = rad_acct_timeout;
rpd->acct_req->timeout.period = conf_timeout * 1000;
-
+
rpd->acct_interim_timer.expire = rad_acct_interim_update;
rpd->acct_interim_timer.period = rpd->acct_interim_interval ? rpd->acct_interim_interval * 1000 : STAT_UPDATE_INTERVAL;
- if (rpd->acct_interim_interval && triton_timer_add(rpd->ses->ctrl->ctx, &rpd->acct_interim_timer, 0)) {
- triton_md_unregister_handler(&rpd->acct_req->hnd, 0);
- triton_timer_del(&rpd->acct_req->timeout);
- goto out_err;
- }
+ if (rpd->acct_interim_interval)
+ triton_timer_add(rpd->ses->ctrl->ctx, &rpd->acct_interim_timer, 0);
return 0;
out_err: