]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Remove stop_timer() and so make multiple servers work again. I really don't
authorJohn Hay <hay@ntp.org>
Wed, 31 Jul 2002 19:33:33 +0000 (21:33 +0200)
committerJohn Hay <hay@ntp.org>
Wed, 31 Jul 2002 19:33:33 +0000 (21:33 +0200)
know why this piece of code came with the original IPv6 port. Ntpdate did not
need it before and is broken with it.

bk: 3d483b8d8UtBhrg8XPxg-V7ogxGZoA

ntpdate/ntpdate.c

index 3c9137f30b20ad55b9736ae3071a11685609f289..0112e8ed9169e78df77fb4a4715b3a0ce0f0759a 100644 (file)
@@ -199,7 +199,6 @@ int never_step = 0;
 
 int    ntpdatemain P((int, char **));
 
-static void    stop_timer      P((void));
 static void    transmit        P((struct server *));
 static void    receive         P((struct recvbuf *));
 static void    server_data P((struct server *, s_fp, l_fp *, u_fp));
@@ -663,19 +662,6 @@ ntpdatemain (
        return clock_adjust();
 }
 
-static void
-stop_timer(void)
-{
-        struct itimerval itimer;
-
-        itimer.it_interval.tv_sec = itimer.it_value.tv_sec = 9999;
-       itimer.it_interval.tv_usec = 1000000/TIMER_HZ;
-       itimer.it_value.tv_usec = 1000000/(TIMER_HZ<<1);
-        setitimer(ITIMER_REAL, &itimer, (struct itimerval *)0);
-
-}
-
-
 
 /*
  * transmit - transmit a packet to the given server, or mark it completed.
@@ -1548,11 +1534,6 @@ init_alarm(void)
        itimer.it_interval.tv_usec = 1000000/TIMER_HZ;
        itimer.it_value.tv_usec = 1000000/(TIMER_HZ<<1);
 
-        /*itimer.it_interval.tv_sec = itimer.it_value.tv_sec = 999;
-       itimer.it_interval.tv_usec = 1000000/TIMER_HZ;
-        itimer.it_value.tv_sec = 0;
-        itimer.it_value.tv_usec = 1000;
-        */
        setitimer(ITIMER_REAL, &itimer, (struct itimerval *)0);
 # endif
 #if defined SYS_CYGWIN32
@@ -1848,7 +1829,7 @@ input_handler(void)
        fd_set fds;
 #endif
         int fdc = 0;
-        stop_timer();
+
        /*
         * Do a poll to see if we have data
         */