diff --git a/src/igmpproxy.c b/src/igmpproxy.c index 9d1172b3..effb9162 100644 --- a/src/igmpproxy.c +++ b/src/igmpproxy.c @@ -297,7 +297,7 @@ void igmpProxyRun(void) { timeout = NULL; } else { timeout->tv_nsec = 0; - timeout->tv_sec = (secs > 3) ? 3 : secs; // aimwang: set max timeout + timeout->tv_sec = secs = (secs > 3) ? 3 : secs; // aimwang: set max timeout } // Prepare for select. @@ -338,7 +338,7 @@ void igmpProxyRun(void) { * call gettimeofday. */ if (Rt == 0) { - curtime.tv_sec = lasttime.tv_sec + secs; + curtime.tv_sec = lasttime.tv_sec + secs;// secs must less than 3 curtime.tv_nsec = lasttime.tv_nsec; Rt = -1; /* don't do this next time through the loop */ } else {