summaryrefslogtreecommitdiff
path: root/accel-pppd/radius
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/radius')
-rw-r--r--accel-pppd/radius/radius_p.h2
-rw-r--r--accel-pppd/radius/req.c3
-rw-r--r--accel-pppd/radius/serv.c8
3 files changed, 9 insertions, 4 deletions
diff --git a/accel-pppd/radius/radius_p.h b/accel-pppd/radius/radius_p.h
index cfb92cd..22124a2 100644
--- a/accel-pppd/radius/radius_p.h
+++ b/accel-pppd/radius/radius_p.h
@@ -73,7 +73,7 @@ struct rad_req_t {
in_addr_t server_addr;
- int server_port:16;
+ int server_port;
int type:8;
int try:6;
int active:1;
diff --git a/accel-pppd/radius/req.c b/accel-pppd/radius/req.c
index 172fb1c..94754a2 100644
--- a/accel-pppd/radius/req.c
+++ b/accel-pppd/radius/req.c
@@ -398,7 +398,8 @@ int rad_req_read(struct triton_md_handler_t *h)
req->reply = pack;
- rad_server_req_exit(req);
+ if (req->active)
+ rad_server_req_exit(req);
if (req->log) {
req->log("recv ");
diff --git a/accel-pppd/radius/serv.c b/accel-pppd/radius/serv.c
index 6c01a88..2f69c66 100644
--- a/accel-pppd/radius/serv.c
+++ b/accel-pppd/radius/serv.c
@@ -134,7 +134,8 @@ int rad_server_req_cancel(struct rad_req_t *req)
}
pthread_mutex_unlock(&req->serv->lock);
- rad_server_req_exit(req);
+ if (req->active)
+ rad_server_req_exit(req);
if (req->timeout.tpd)
triton_timer_del(&req->timeout);
@@ -186,7 +187,10 @@ int rad_server_req_enter(struct rad_req_t *req)
pthread_mutex_unlock(&req->serv->lock);
req->active = 1;
-
+
+ if (req->send)
+ return req->send(req, 0);
+
return 0;
}