From: Juergen Perlinger Date: Thu, 12 Oct 2017 10:55:29 +0000 (+0200) Subject: [Bug 3439] (ntpq) When running multiple commands / hosts in ntpq... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=baea183390d28e3ee3882b6e2f6047ee76712f4f;p=thirdparty%2Fntp.git [Bug 3439] (ntpq) When running multiple commands / hosts in ntpq... bk: 59df4a21w4evlXxY9nZGk04taV9gXQ --- diff --git a/ChangeLog b/ChangeLog index 7578bdb73..8e87d231d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ --- * [Bug 3438] Negative values and values > 999 days in... - applied patch by ggarvey (with minor mods) +* [Bug 3439] When running multiple commands / hosts in ntpq... + - applied patch by ggarvey --- (4.2.8p10-win-beta1) 2017/03/21 Released by Harlan Stenn diff --git a/ntpq/ntpq.c b/ntpq/ntpq.c index 547f3cc5d..b1b529db6 100644 --- a/ntpq/ntpq.c +++ b/ntpq/ntpq.c @@ -584,9 +584,15 @@ ntpqmain( getcmds(); } else { for (ihost = 0; ihost < numhosts; ihost++) { - if (openhost(chosts[ihost].name, chosts[ihost].fam)) - for (icmd = 0; icmd < numcmds; icmd++) + if (openhost(chosts[ihost].name, chosts[ihost].fam)) { + if (ihost) + fputc('\n', current_output); + for (icmd = 0; icmd < numcmds; icmd++) { + if (icmd) + fputc('\n', current_output); docmd(ccmds[icmd]); + } + } } } #ifdef SYS_WINNT