summaryrefslogtreecommitdiff
path: root/accel-pppd
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-05-12 14:36:46 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-05-12 14:36:46 +0400
commit1c79692a883d065c4d0c185e91c16afda49d5d36 (patch)
treefca81254214fcaa1f86f0ff64bdb9e29148420f4 /accel-pppd
parentf28cc4b2c0a00029b7aee3cc36d478df279f9c9b (diff)
downloadaccel-ppp-1c79692a883d065c4d0c185e91c16afda49d5d36.tar.gz
accel-ppp-1c79692a883d065c4d0c185e91c16afda49d5d36.zip
radius: close socket after receiving accounting reply
Diffstat (limited to 'accel-pppd')
-rw-r--r--accel-pppd/radius/acct.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/accel-pppd/radius/acct.c b/accel-pppd/radius/acct.c
index 18033446..dc14bccf 100644
--- a/accel-pppd/radius/acct.c
+++ b/accel-pppd/radius/acct.c
@@ -107,7 +107,9 @@ static int rad_acct_read(struct triton_md_handler_t *h)
triton_timer_del(&req->timeout);
}
- return 0;
+ triton_md_unregister_handler(h, 1);
+
+ return 1;
}
static void __rad_req_send(struct rad_req_t *req)
@@ -148,6 +150,7 @@ static void rad_acct_timeout(struct triton_timer_t *t)
if (conf_acct_timeout == 0) {
rad_server_timeout(req->serv);
triton_timer_del(t);
+ triton_md_unregister_handler(&req->hnd, 1);
return;
}
@@ -368,7 +371,9 @@ void rad_acct_stop(struct radius_pd_t *rpd)
triton_timer_del(&rpd->acct_interim_timer);
if (rpd->acct_req) {
- triton_md_unregister_handler(&rpd->acct_req->hnd, 0);
+ if (rpd->acct_req->hnd.tpd)
+ triton_md_unregister_handler(&rpd->acct_req->hnd, 0);
+
if (rpd->acct_req->timeout.tpd)
triton_timer_del(&rpd->acct_req->timeout);