Index: rpcclnt.c =================================================================== RCS file: /home/ncvs/src/sys/rpc/rpcclnt.c,v retrieving revision 1.7 diff -u -r1.7 rpcclnt.c --- rpcclnt.c 7 Mar 2004 16:23:03 -0000 1.7 +++ rpcclnt.c 9 Mar 2004 04:09:05 -0000 @@ -284,7 +284,6 @@ rpcclnt_timer(&rpcclnt_timer_to); #else /* !__OpenBSD__ */ callout_init(&rpcclnt_callout, 0); - rpcclnt_timer(NULL); #endif /* !__OpenBSD__ */ RPCDEBUG("rpc initialed"); @@ -296,9 +295,8 @@ rpcclnt_uninit(void) { RPCDEBUG("uninit"); - callout_stop(&rpcclnt_callout); - /* XXX delete sysctl variables? */ + callout_stop(&rpcclnt_callout); } int @@ -1197,6 +1195,9 @@ * LAST so timer finds oldest requests first. */ s = splsoftclock(); + if (TAILQ_EMPTY(&rpctask_q)) + callout_reset(&rpcclnt_callout, rpcclnt_ticks, rpcclnt_timer, + NULL); TAILQ_INSERT_TAIL(&rpctask_q, task, r_chain); /* @@ -1238,6 +1239,8 @@ */ s = splsoftclock(); TAILQ_REMOVE(&rpctask_q, task, r_chain); + if (TAILQ_EMPTY(&rpctask_q)) + callout_stop(&rpcclnt_callout); splx(s); /* @@ -1475,8 +1478,6 @@ #ifdef __OpenBSD__ timeout_add(rpcclnt_timer, to, rpcclnt_ticks); -#else - callout_reset(&rpcclnt_callout, rpcclnt_ticks, rpcclnt_timer, NULL); #endif }