[783] in Zephyr_Bugs
server|zhm/timer.c: timer_timeout has inverse logic
daemon@ATHENA.MIT.EDU (Sam Hartman)
Mon Jun 3 18:17:18 1996
From: Sam Hartman <shartman@parc.xerox.com>
To: bug-zephyr@MIT.EDU
Cc: shartman@parc.xerox.com
Date: Mon, 3 Jun 1996 15:16:59 PDT
The timer_timeout function in both the Zephyr server and host
manager only checks the maximum time remaining if num_timers==0. This
should only be checked if num_timers!=0. As a side effect, you get
very long timeouts when there are no timers and no timeout when there
are timers.
*** /tilde/shartman/zephyr-2.1.beta1/zhm/timer.c~ Mon Jun 3 10:09:52 1996
--- /tilde/shartman/zephyr-2.1.beta1/zhm/timer.c Mon Jun 3 10:11:13 1996
***************
*** 233,239 ****
timer_timeout(tvbuf)
struct timeval *tvbuf;
{
! if (num_timers > 0 0) {
tvbuf->tv_sec = heap[0]->abstime - time(NULL);
tvbuf->tv_usec = 0;
return tvbuf;
--- 233,239 ----
timer_timeout(tvbuf)
struct timeval *tvbuf;
{
! if (num_timers > 0) {
tvbuf->tv_sec = heap[0]->abstime - time(NULL);
tvbuf->tv_usec = 0;
return tvbuf;