summaryrefslogtreecommitdiff
path: root/accel-pppd/radius/req.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-10-23 14:44:32 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-10-23 14:44:32 +0400
commit2305d7b30b13058efce059fcc7e6f370d43214d3 (patch)
tree6fb1db6de334bc9de6a711c85e931d2ee3e3af40 /accel-pppd/radius/req.c
parentd30d6a5f2605aee09137e75f471cc511c3e0d961 (diff)
downloadaccel-ppp-2305d7b30b13058efce059fcc7e6f370d43214d3.tar.gz
accel-ppp-2305d7b30b13058efce059fcc7e6f370d43214d3.zip
radius: fixed server reallocation for queued requests if current server does not respond
Diffstat (limited to 'accel-pppd/radius/req.c')
-rw-r--r--accel-pppd/radius/req.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/accel-pppd/radius/req.c b/accel-pppd/radius/req.c
index fb5183bc..84a4f3d9 100644
--- a/accel-pppd/radius/req.c
+++ b/accel-pppd/radius/req.c
@@ -305,7 +305,8 @@ int __rad_req_send(struct rad_req_t *req, int async)
{
if (async == -1) {
req->try = conf_max_try - 1;
- rad_req_send(req);
+ if (rad_req_send(req))
+ req->sent(req, -1);
return 0;
}
@@ -351,8 +352,8 @@ int rad_req_send(struct rad_req_t *req)
req->send = __rad_req_send;
if (req->try++ == conf_max_try) {
- rad_server_req_exit(req);
rad_server_fail(req->serv);
+ rad_server_req_exit(req);
if (rad_server_realloc(req)) {
if (req->rpd)
@@ -393,6 +394,8 @@ int rad_req_read(struct triton_md_handler_t *h)
while (1) {
if (rad_packet_recv(h->fd, &pack, NULL))
return 0;
+
+ rad_server_reply(req->serv);
if (pack->id == req->pack->id)
break;