diff options
Diffstat (limited to 'accel-pppd/radius')
-rw-r--r-- | accel-pppd/radius/acct.c | 4 | ||||
-rw-r--r-- | accel-pppd/radius/dm_coa.c | 3 | ||||
-rw-r--r-- | accel-pppd/radius/req.c | 2 | ||||
-rw-r--r-- | accel-pppd/radius/serv.c | 8 |
4 files changed, 9 insertions, 8 deletions
diff --git a/accel-pppd/radius/acct.c b/accel-pppd/radius/acct.c index 161b959a..18033446 100644 --- a/accel-pppd/radius/acct.c +++ b/accel-pppd/radius/acct.c @@ -343,7 +343,7 @@ out: 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); + triton_md_unregister_handler(&rpd->acct_req->hnd, 0); triton_timer_del(&rpd->acct_req->timeout); goto out_err; } @@ -368,7 +368,7 @@ 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); + triton_md_unregister_handler(&rpd->acct_req->hnd, 0); if (rpd->acct_req->timeout.tpd) triton_timer_del(&rpd->acct_req->timeout); diff --git a/accel-pppd/radius/dm_coa.c b/accel-pppd/radius/dm_coa.c index 13719ae3..0235ba4a 100644 --- a/accel-pppd/radius/dm_coa.c +++ b/accel-pppd/radius/dm_coa.c @@ -268,8 +268,7 @@ static int dm_coa_read(struct triton_md_handler_t *h) static void dm_coa_close(struct triton_context_t *ctx) { struct dm_coa_serv_t *serv = container_of(ctx, typeof(*serv), ctx); - triton_md_unregister_handler(&serv->hnd); - close(serv->hnd.fd); + triton_md_unregister_handler(&serv->hnd, 1); triton_context_unregister(ctx); } diff --git a/accel-pppd/radius/req.c b/accel-pppd/radius/req.c index 70e0431f..2b789ad7 100644 --- a/accel-pppd/radius/req.c +++ b/accel-pppd/radius/req.c @@ -287,7 +287,7 @@ static void req_wakeup(struct rad_req_t *req) struct triton_context_t *ctx = req->wait_ctx; if (req->timeout.tpd) triton_timer_del(&req->timeout); - triton_md_unregister_handler(&req->hnd); + triton_md_unregister_handler(&req->hnd, 0); triton_context_unregister(&req->ctx); triton_context_wakeup(ctx); } diff --git a/accel-pppd/radius/serv.c b/accel-pppd/radius/serv.c index c7b19166..6a080709 100644 --- a/accel-pppd/radius/serv.c +++ b/accel-pppd/radius/serv.c @@ -175,9 +175,11 @@ int rad_server_realloc(struct rad_req_t *req) if (req->hnd.fd != -1) { if (req->hnd.tpd) - triton_md_unregister_handler(&req->hnd); - close(req->hnd.fd); - req->hnd.fd = -1; + triton_md_unregister_handler(&req->hnd, 1); + else { + close(req->hnd.fd); + req->hnd.fd = -1; + } } req->server_addr = req->serv->addr; |