From 01b98590dadce512d59c8b92e13b3c9587c3f481 Mon Sep 17 00:00:00 2001 From: Fabian Mauchle Date: Tue, 25 Jun 2019 08:50:36 +0200 Subject: [PATCH] fix status-server may be triggered multiple times --- radsecproxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radsecproxy.c b/radsecproxy.c index 475a416..c9becae 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -1710,7 +1710,7 @@ void *clientwr(void *arg) { do_resend = 0; if (server->state == RSP_SERVER_STATE_CONNECTED && !(conf->statusserver == RSP_STATSRV_OFF)) { gettimeofday(&now, NULL); - if ((conf->statusserver == RSP_STATSRV_ON && now.tv_sec - (laststatsrv.tv_sec ? server->lastrcv.tv_sec : laststatsrv.tv_sec) > STATUS_SERVER_PERIOD) || + if ((conf->statusserver == RSP_STATSRV_ON && now.tv_sec - (server->lastrcv.tv_sec > laststatsrv.tv_sec ? server->lastrcv.tv_sec : laststatsrv.tv_sec) > STATUS_SERVER_PERIOD) || (conf->statusserver == RSP_STATSRV_MINIMAL && statusserver_requested && now.tv_sec - laststatsrv.tv_sec > STATUS_SERVER_PERIOD) || (conf->statusserver == RSP_STATSRV_AUTO && server->lastreply.tv_sec >= laststatsrv.tv_sec)) {