summaryrefslogtreecommitdiff
path: root/accel-pppd/radius/radius.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/radius/radius.c')
-rw-r--r--accel-pppd/radius/radius.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/accel-pppd/radius/radius.c b/accel-pppd/radius/radius.c
index c94769c5..fa2b6a64 100644
--- a/accel-pppd/radius/radius.c
+++ b/accel-pppd/radius/radius.c
@@ -277,16 +277,13 @@ static void session_timeout(struct triton_timer_t *t)
static void idle_timeout(struct triton_timer_t *t)
{
struct radius_pd_t *rpd = container_of(t, typeof(*rpd), idle_timeout);
- time_t tt;
-
+
if (rpd->ses->stop_time)
return;
- time(&tt);
-
ap_session_read_stats(rpd->ses, NULL);
- if (tt - rpd->ses->idle_time > t->period / 1000) {
+ if (_time() - rpd->ses->idle_time > t->period / 1000) {
log_ppp_msg("radius: idle timed out\n");
ap_session_terminate(rpd->ses, TERM_IDLE_TIMEOUT, 0);
}