]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 3439] (ntpq) When running multiple commands / hosts in ntpq...
authorJuergen Perlinger <perlinger@ntp.org>
Thu, 12 Oct 2017 10:55:29 +0000 (12:55 +0200)
committerJuergen Perlinger <perlinger@ntp.org>
Thu, 12 Oct 2017 10:55:29 +0000 (12:55 +0200)
bk: 59df4a21w4evlXxY9nZGk04taV9gXQ

ChangeLog
ntpq/ntpq.c

index 7578bdb73fa1058fe4a6666cc47fb1b3daeed9d3..8e87d231d0fd2759ac1ea3d25640e1fa4d1cd83e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 ---
 * [Bug 3438] Negative values and values > 999 days in... <perlinger@ntp.org>
  - applied patch by ggarvey (with minor mods)
+* [Bug 3439] When running multiple commands / hosts in ntpq... <perlinger@ntp.org>
+ - applied patch by ggarvey
 
 ---
 (4.2.8p10-win-beta1) 2017/03/21 Released by Harlan Stenn <stenn@ntp.org>
index 547f3cc5d22bfb52805b51d1f30e5481168b928c..b1b529db6f08a77e6e8102d13614c3b9490af9a6 100644 (file)
@@ -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