diff options
Diffstat (limited to 'ntpdate/ntpdate.c')
-rw-r--r-- | ntpdate/ntpdate.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/ntpdate/ntpdate.c b/ntpdate/ntpdate.c index 03d9552dd4b4..4cf0f6265cda 100644 --- a/ntpdate/ntpdate.c +++ b/ntpdate/ntpdate.c @@ -2176,10 +2176,11 @@ print_server( str, fptoa((s_fp)pp->rootdelay, 6), ufptoa(pp->rootdisp, 6)); - (void) fprintf(fp, "transmitted %d, in filter %d\n", + if (pp->xmtcnt != pp->filter_nextpt) + (void) fprintf(fp, "transmitted %d, in filter %d\n", pp->xmtcnt, pp->filter_nextpt); - (void) fprintf(fp, "reference time: %s\n", + (void) fprintf(fp, "reference time: %s\n", prettydate(&pp->reftime)); (void) fprintf(fp, "originate timestamp: %s\n", prettydate(&pp->org)); @@ -2189,22 +2190,24 @@ print_server( if (sys_samples > 1) { (void) fprintf(fp, "filter delay: "); for (i = 0; i < NTP_SHIFT; i++) { - (void) fprintf(fp, " %-8.8s", fptoa(pp->filter_delay[i], 5)); - if (i == (NTP_SHIFT>>1)-1) - (void) fprintf(fp, "\n "); + if (i == (NTP_SHIFT>>1)) + (void) fprintf(fp, "\n "); + (void) fprintf(fp, " %-10.10s", + (i<sys_samples ? fptoa(pp->filter_delay[i], 5) : "----")); } (void) fprintf(fp, "\n"); (void) fprintf(fp, "filter offset:"); for (i = 0; i < PEER_SHIFT; i++) { - (void) fprintf(fp, " %-8.8s", lfptoa(&pp->filter_offset[i], 6)); - if (i == (PEER_SHIFT>>1)-1) - (void) fprintf(fp, "\n "); + if (i == (PEER_SHIFT>>1)) + (void) fprintf(fp, "\n "); + (void) fprintf(fp, " %-10.10s", + (i<sys_samples ? lfptoa(&pp->filter_offset[i], 6): "----")); } (void) fprintf(fp, "\n"); } - (void) fprintf(fp, "delay %s, dispersion %s\n", + (void) fprintf(fp, "delay %s, dispersion %s, ", fptoa((s_fp)pp->delay, 5), ufptoa(pp->dispersion, 5)); (void) fprintf(fp, "offset %s\n\n", |