summaryrefslogtreecommitdiff
path: root/radsecproxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'radsecproxy.c')
-rw-r--r--radsecproxy.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 30cc0f1..4aa52e3 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -1808,13 +1808,13 @@ struct server *chooseserver(struct list *srvconfs) {
first = server;
if (!server->connectionok)
continue;
- if (!server->loststatsrv)
+ if (!server->lostrqs)
return server;
if (!best) {
best = server;
continue;
}
- if (server->loststatsrv < best->loststatsrv)
+ if (server->lostrqs < best->lostrqs)
best = server;
}
return best ? best : first;
@@ -1960,7 +1960,7 @@ int replyh(struct server *server, unsigned char *buf) {
char tmp[760], stationid[760];
server->connectionok = 1;
- server->loststatsrv = 0;
+ server->lostrqs = 0;
i = buf[1]; /* i is the id */
@@ -2240,11 +2240,9 @@ void *clientwr(void *arg) {
if (rq->tries == (*rq->buf == RAD_Status_Server || server->conf->type == 'T'
? 1 : REQUEST_RETRIES)) {
debug(DBG_DBG, "clientwr: removing expired packet from queue");
- if (*rq->buf == RAD_Status_Server) {
- debug(DBG_WARN, "clientwr: no status server response, %s dead?", server->conf->host);
- if (server->loststatsrv < 255)
- server->loststatsrv++;
- }
+ debug(DBG_WARN, "clientwr: no server response, %s dead?", server->conf->host);
+ if (server->lostrqs < 255)
+ server->lostrqs++;
freerqdata(rq);
/* setting this to NULL means that it can be reused */
rq->buf = NULL;