fixed bug with timeout and statusserver
authorvenaas <venaas>
Fri, 11 Apr 2008 08:08:05 +0000 (08:08 +0000)
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>
Fri, 11 Apr 2008 08:08:05 +0000 (08:08 +0000)
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@226 e88ac4ed-0b26-0410-9574-a7f39faa03bf

radsecproxy.c

index f0d053b..8b7906c 100644 (file)
@@ -2075,7 +2075,7 @@ void *clientwr(void *arg) {
                /* random 0-7 seconds */
                RAND_bytes(&rnd, 1);
                rnd /= 32;
-               if (!timeout.tv_sec || timeout.tv_sec - now.tv_sec > lastsend.tv_sec + STATUS_SERVER_PERIOD + rnd)
+               if (!timeout.tv_sec || timeout.tv_sec > lastsend.tv_sec + STATUS_SERVER_PERIOD + rnd)
                    timeout.tv_sec = lastsend.tv_sec + STATUS_SERVER_PERIOD + rnd;
            }   
            if (timeout.tv_sec) {