summaryrefslogtreecommitdiff
path: root/accel-pppd/radius
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-10-22 19:25:43 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-10-22 19:25:43 +0400
commit1497887f794b1a770c0e01a2ef3030e4229213dc (patch)
tree20345336cb04edac91dc876250cf059e4e37e95c /accel-pppd/radius
parentc73bda7c792a850dc24dc22cf6065eaaad717b69 (diff)
downloadaccel-ppp-1497887f794b1a770c0e01a2ef3030e4229213dc.tar.gz
accel-ppp-1497887f794b1a770c0e01a2ef3030e4229213dc.zip
radius: check for previous request was finished in interim update timer
Diffstat (limited to 'accel-pppd/radius')
-rw-r--r--accel-pppd/radius/acct.c6
-rw-r--r--accel-pppd/radius/serv.c1
2 files changed, 4 insertions, 3 deletions
diff --git a/accel-pppd/radius/acct.c b/accel-pppd/radius/acct.c
index 7fbf137..aa8c70b 100644
--- a/accel-pppd/radius/acct.c
+++ b/accel-pppd/radius/acct.c
@@ -71,7 +71,7 @@ static void rad_acct_sent(struct rad_req_t *req, int res)
triton_timer_del(&req->timeout);
return;
}
-
+
__sync_add_and_fetch(&req->serv->stat_interim_sent, 1);
if (!req->hnd.tpd) {
@@ -106,7 +106,7 @@ static void rad_acct_timeout(struct triton_timer_t *t)
struct rad_req_t *req = container_of(t, typeof(*req), timeout);
time_t dt;
struct timespec ts;
-
+
rad_server_req_exit(req);
rad_server_timeout(req->serv);
@@ -157,7 +157,7 @@ static void rad_acct_interim_update(struct triton_timer_t *t)
struct radius_pd_t *rpd = container_of(t, typeof(*rpd), acct_interim_timer);
struct timespec ts;
- if (rpd->acct_req->timeout.tpd)
+ if (rpd->acct_req->entry.next || rpd->acct_req->timeout.tpd)
return;
if (rpd->session_timeout.expire_tv.tv_sec &&
diff --git a/accel-pppd/radius/serv.c b/accel-pppd/radius/serv.c
index 6693135..43778ca 100644
--- a/accel-pppd/radius/serv.c
+++ b/accel-pppd/radius/serv.c
@@ -179,6 +179,7 @@ int rad_server_req_enter(struct rad_req_t *req)
}
assert(!req->active);
+ assert(!req->entry.next);
pthread_mutex_lock(&req->serv->lock);