From: Harlan Stenn Date: Sun, 14 Jun 2015 05:15:48 +0000 (+0000) Subject: [Bug 2778] Implement "apeers" ntpq command to include associd X-Git-Tag: NTP_4_3_41~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5c1f9966dd6ffb6f08dc70d7b75aabd28e92980;p=thirdparty%2Fntp.git [Bug 2778] Implement "apeers" ntpq command to include associd bk: 557d0e04ibm3oy0Mo3IirqENrH09UA --- diff --git a/ntpq/ntpq-subs.c b/ntpq/ntpq-subs.c index bca69106d..69282e331 100644 --- a/ntpq/ntpq-subs.c +++ b/ntpq/ntpq-subs.c @@ -1654,7 +1654,7 @@ doprintpeers( fprintf(stderr, "malformed %s=%s\n", name, value); } else if (!strcmp("srchost", name)) { - if (pvl == peervarlist) { + if (pvl == peervarlist || pvl == apeervarlist) { len = strlen(value); if (2 < len && (size_t)len < sizeof(clock_name)) { @@ -1745,8 +1745,8 @@ doprintpeers( } else if (!strcmp("offset", name)) { decodetime(value, &estoffset); } else if (!strcmp("jitter", name)) { - if (pvl == peervarlist && - decodetime(value, &estjitter)) + if ((pvl == peervarlist || pvl == apeervarlist) + && decodetime(value, &estjitter)) have_jitter = 1; } else if (!strcmp("rootdisp", name) || !strcmp("dispersion", name)) { @@ -1812,7 +1812,8 @@ doprintpeers( else c = flash2[CTL_PEER_STATVAL(rstatus) & 0x3]; if (numhosts > 1) { - if (peervarlist == pvl && have_dstadr) { + if ((pvl == peervarlist || pvl == apeervarlist) + && have_dstadr) { serverlocal = nntohost_col(&dstadr, (size_t)min(LIB_BUFLENGTH - 1, maxhostlen), TRUE);