diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-03 12:00:26 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-03 12:00:26 +0100 |
commit | 510f56aa6fe62465989507b163ab737c2cf882aa (patch) | |
tree | 98834a0e38dd24cf9bcfd5d88bdff7fc788ad63a /networking/ntpd.c | |
parent | 0b002812a8c2a95ab18374452fd0ab2065ed4029 (diff) | |
download | busybox-w32-510f56aa6fe62465989507b163ab737c2cf882aa.tar.gz busybox-w32-510f56aa6fe62465989507b163ab737c2cf882aa.tar.bz2 busybox-w32-510f56aa6fe62465989507b163ab737c2cf882aa.zip |
ntpd: remove an old hack for faster initialization
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/ntpd.c')
-rw-r--r-- | networking/ntpd.c | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/networking/ntpd.c b/networking/ntpd.c index 520dcd16b..08e51ef3f 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c | |||
@@ -544,11 +544,6 @@ add_peers(char *s) | |||
544 | p->p_xmt_msg.m_status = MODE_CLIENT | (NTP_VERSION << 3); | 544 | p->p_xmt_msg.m_status = MODE_CLIENT | (NTP_VERSION << 3); |
545 | p->next_action_time = G.cur_time; /* = set_next(p, 0); */ | 545 | p->next_action_time = G.cur_time; /* = set_next(p, 0); */ |
546 | reset_peer_stats(p, 16 * STEP_THRESHOLD); | 546 | reset_peer_stats(p, 16 * STEP_THRESHOLD); |
547 | /* Speed up initial sync: with small offsets from peers, | ||
548 | * 3 samples will sync | ||
549 | */ | ||
550 | p->filter_datapoint[6].d_dispersion = 0; | ||
551 | p->filter_datapoint[7].d_dispersion = 0; | ||
552 | 547 | ||
553 | llist_add_to(&G.ntp_peers, p); | 548 | llist_add_to(&G.ntp_peers, p); |
554 | G.peer_cnt++; | 549 | G.peer_cnt++; |
@@ -710,8 +705,9 @@ compare_survivor_metric(const void *aa, const void *bb) | |||
710 | { | 705 | { |
711 | const survivor_t *a = aa; | 706 | const survivor_t *a = aa; |
712 | const survivor_t *b = bb; | 707 | const survivor_t *b = bb; |
713 | if (a->metric < b->metric) | 708 | if (a->metric < b->metric) { |
714 | return -1; | 709 | return -1; |
710 | } | ||
715 | return (a->metric > b->metric); | 711 | return (a->metric > b->metric); |
716 | } | 712 | } |
717 | static int | 713 | static int |
@@ -1290,26 +1286,6 @@ update_local_clock(peer_t *p) | |||
1290 | G.kernel_freq_drift = tmx.freq / 65536; | 1286 | G.kernel_freq_drift = tmx.freq / 65536; |
1291 | VERB2 bb_error_msg("kernel clock drift: %ld ppm", G.kernel_freq_drift); | 1287 | VERB2 bb_error_msg("kernel clock drift: %ld ppm", G.kernel_freq_drift); |
1292 | } | 1288 | } |
1293 | // #define STA_MODE 0x4000 /* mode (0 = PLL, 1 = FLL) (ro) */ - ? | ||
1294 | // it appeared after a while: | ||
1295 | //ntpd: p adjtimex freq:-14545653 offset:-5396 constant:10 status:0x41 | ||
1296 | //ntpd: c adjtimex freq:-14547835 offset:-8307 constant:10 status:0x1 | ||
1297 | //ntpd: p adjtimex freq:-14547835 offset:-6398 constant:10 status:0x41 | ||
1298 | //ntpd: c adjtimex freq:-14550486 offset:-10158 constant:10 status:0x1 | ||
1299 | //ntpd: p adjtimex freq:-14550486 offset:-6132 constant:10 status:0x41 | ||
1300 | //ntpd: c adjtimex freq:-14636129 offset:-10158 constant:10 status:0x4001 | ||
1301 | //ntpd: p adjtimex freq:-14636129 offset:-10002 constant:10 status:0x4041 | ||
1302 | //ntpd: c adjtimex freq:-14636245 offset:-7497 constant:10 status:0x1 | ||
1303 | //ntpd: p adjtimex freq:-14636245 offset:-4573 constant:10 status:0x41 | ||
1304 | //ntpd: c adjtimex freq:-14642034 offset:-11715 constant:10 status:0x1 | ||
1305 | //ntpd: p adjtimex freq:-14642034 offset:-4098 constant:10 status:0x41 | ||
1306 | //ntpd: c adjtimex freq:-14699112 offset:-11746 constant:10 status:0x4001 | ||
1307 | //ntpd: p adjtimex freq:-14699112 offset:-4239 constant:10 status:0x4041 | ||
1308 | //ntpd: c adjtimex freq:-14762330 offset:-12786 constant:10 status:0x4001 | ||
1309 | //ntpd: p adjtimex freq:-14762330 offset:-4434 constant:10 status:0x4041 | ||
1310 | //ntpd: b adjtimex freq:0 offset:-9669 constant:8 status:0x1 | ||
1311 | //ntpd: adjtimex:0 freq:-14809095 offset:-9669 constant:10 status:0x4001 | ||
1312 | //ntpd: c adjtimex freq:-14809095 offset:-9669 constant:10 status:0x4001 | ||
1313 | 1289 | ||
1314 | return 1; /* "ok to increase poll interval" */ | 1290 | return 1; /* "ok to increase poll interval" */ |
1315 | } | 1291 | } |
@@ -1333,7 +1309,6 @@ retry_interval(void) | |||
1333 | static unsigned | 1309 | static unsigned |
1334 | poll_interval(int exponent) | 1310 | poll_interval(int exponent) |
1335 | { | 1311 | { |
1336 | /* Want to send next packet at (1 << G.poll_exp) + small random value */ | ||
1337 | unsigned interval, r; | 1312 | unsigned interval, r; |
1338 | exponent = G.poll_exp + exponent; | 1313 | exponent = G.poll_exp + exponent; |
1339 | if (exponent < 0) | 1314 | if (exponent < 0) |