diff options
Diffstat (limited to 'networking/ntpd.c')
-rw-r--r-- | networking/ntpd.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/networking/ntpd.c b/networking/ntpd.c index 5cad738c6..cabfb795a 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c | |||
@@ -1484,7 +1484,20 @@ recv_and_process_peer_pkt(peer_t *p) | |||
1484 | if (G.polladj_count < -POLLADJ_LIMIT) { | 1484 | if (G.polladj_count < -POLLADJ_LIMIT) { |
1485 | G.polladj_count = 0; | 1485 | G.polladj_count = 0; |
1486 | if (G.poll_exp > MINPOLL) { | 1486 | if (G.poll_exp > MINPOLL) { |
1487 | llist_t *item; | ||
1488 | |||
1487 | G.poll_exp--; | 1489 | G.poll_exp--; |
1490 | /* Correct p->next_action_time in each peer | ||
1491 | * which waits for sending, so that they send earlier. | ||
1492 | * Old pp->next_action_time are on the order | ||
1493 | * of t + (1 << old_poll_exp) + small_random, | ||
1494 | * we simply need to subtract ~half of that. | ||
1495 | */ | ||
1496 | for (item = G.ntp_peers; item != NULL; item = item->link) { | ||
1497 | peer_t *pp = (peer_t *) item->data; | ||
1498 | if (pp->p_fd < 0) | ||
1499 | pp->next_action_time -= (1 << G.poll_exp); | ||
1500 | } | ||
1488 | VERB3 bb_error_msg("polladj: discipline_jitter:%f --poll_exp=%d", | 1501 | VERB3 bb_error_msg("polladj: discipline_jitter:%f --poll_exp=%d", |
1489 | G.discipline_jitter, G.poll_exp); | 1502 | G.discipline_jitter, G.poll_exp); |
1490 | } | 1503 | } |