summaryrefslogtreecommitdiff
path: root/accel-pppd/radius/req.c
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2011-08-24 18:43:02 +0400
committerKozlov Dmitry <dima@server>2011-08-24 18:43:02 +0400
commit9d4a4daad3221efefbdb2a6b98c301d75d9b23bc (patch)
tree32d3c206e2ee0b159f9589e327737c2f773665b3 /accel-pppd/radius/req.c
parent52223ac31751a5ec0bd8be3beb3fdd0559353b54 (diff)
downloadaccel-ppp-9d4a4daad3221efefbdb2a6b98c301d75d9b23bc.tar.gz
accel-ppp-9d4a4daad3221efefbdb2a6b98c301d75d9b23bc.zip
radius: load balancing improvement
Diffstat (limited to 'accel-pppd/radius/req.c')
-rw-r--r--accel-pppd/radius/req.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/accel-pppd/radius/req.c b/accel-pppd/radius/req.c
index 1f956bf2..c9b91494 100644
--- a/accel-pppd/radius/req.c
+++ b/accel-pppd/radius/req.c
@@ -32,7 +32,9 @@ struct rad_req_t *rad_req_alloc(struct radius_pd_t *rpd, int code, const char *u
req->hnd.fd = -1;
req->ctx.before_switch = log_switch;
- req->serv = rad_server_get(code == CODE_ACCESS_REQUEST ? RAD_SERV_AUTH : RAD_SERV_ACCT);
+ req->type = code == CODE_ACCESS_REQUEST ? RAD_SERV_AUTH : RAD_SERV_ACCT;
+
+ req->serv = rad_server_get(req->type);
if (!req->serv)
goto out_err;
@@ -151,7 +153,7 @@ int rad_req_acct_fill(struct rad_req_t *req)
void rad_req_free(struct rad_req_t *req)
{
if (req->serv)
- rad_server_put(req->serv);
+ rad_server_put(req->serv, req->type);
if (req->hnd.fd >= 0 )
close(req->hnd.fd);
if (req->pack)