From: Dave Hart Date: Tue, 18 Oct 2011 06:33:06 +0000 (+0000) Subject: [Bug 2035] ntpq -c mrulist sleeps 1 sec between queries, not 5 msec. X-Git-Tag: NTP_4_2_7P226~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d9b817ea44741f0229979d69e7a5bb8ec92d350;p=thirdparty%2Fntp.git [Bug 2035] ntpq -c mrulist sleeps 1 sec between queries, not 5 msec. bk: 4e9d1da2B4wjuxS038s4B3TiWKJBtw --- diff --git a/ChangeLog b/ChangeLog index 0c3200f16..ff7739d55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* [Bug 2035] ntpq -c mrulist sleeps 1 sec between queries, not 5 msec. (4.2.7p225) 2011/10/15 Released by Harlan Stenn * Documentation updates from Dave Mills. (4.2.7p224) 2011/10/14 Released by Harlan Stenn diff --git a/configure.ac b/configure.ac index 9f32a5d28..1cf14f37e 100644 --- a/configure.ac +++ b/configure.ac @@ -755,7 +755,7 @@ AC_CHECK_FUNCS( )] ) -AC_CHECK_FUNCS([getbootfile getuid getrusage strsignal]) +AC_CHECK_FUNCS([getbootfile getuid getrusage nanosleep strsignal]) case "$ac_cv_header_kvm_h" in yes) diff --git a/ntpq/ntpq-subs.c b/ntpq/ntpq-subs.c index d5e403584..6a577c1a2 100644 --- a/ntpq/ntpq-subs.c +++ b/ntpq/ntpq-subs.c @@ -2183,19 +2183,15 @@ add_mru( UNLINK_SLIST(unlinked, hash_table[hash], mon, hlink, mru); NTP_INSIST(unlinked == mon); mru_dupes++; - if (debug) - fprintf(stderr, "(updated from %08x.%08x) ", - mon->last.l_ui, mon->last.l_uf); + TRACE(2, ("(updated from %08x.%08x) ", mon->last.l_ui, + mon->last.l_uf)); } LINK_DLIST(mru_list, add, mlink); LINK_SLIST(hash_table[hash], add, hlink); - if (debug) - fprintf(stderr, - "add_mru %08x.%08x c %d m %d v %d rest %x first %08x.%08x %s\n", - add->last.l_ui, add->last.l_uf, add->count, - (int)add->mode, (int)add->ver, (u_int)add->rs, - add->first.l_ui, add->first.l_uf, - sptoa(&add->addr)); + TRACE(2, ("add_mru %08x.%08x c %d m %d v %d rest %x first %08x.%08x %s\n", + add->last.l_ui, add->last.l_uf, add->count, + (int)add->mode, (int)add->ver, (u_int)add->rs, + add->first.l_ui, add->first.l_uf, sptoa(&add->addr))); /* if we didn't update an existing entry, alloc replacement */ if (NULL == mon) { mon = emalloc(sizeof(*mon));