Use corrected system time internally, adjust old offsets after
[dragonfly.git] / usr.sbin / ntpd / patches / ntp.c.patch
1 $DragonFly: src/usr.sbin/ntpd/patches/Attic/ntp.c.patch,v 1.3 2005/04/14 10:31:27 joerg Exp $
2
3 --- ntp.c       25 Feb 2005 16:43:19 -0000      1.6
4 +++ ntp.c       12 Apr 2005 20:13:45 -0000
5 @@ -422,12 +422,15 @@
6                 if (peers[offset_cnt / 2]->addr->ss.ss_family == AF_INET)
7                         conf->status.refid = ((struct sockaddr_in *)
8                             &peers[offset_cnt / 2]->addr->ss)->sin_addr.s_addr;
9 +
10 +               TAILQ_FOREACH(p, &conf->ntp_peers, entry) {
11 +                       for (i = 0; i < OFFSET_ARRAY_SIZE; i++)
12 +                               p->reply[i].offset -= offset_median;
13 +                       p->update.good = 0;
14 +               }
15         }
16  
17         free(peers);
18 -
19 -       TAILQ_FOREACH(p, &conf->ntp_peers, entry)
20 -               p->update.good = 0;
21  }
22  
23  int