[Git][NTPsec/ntpsec][master] Fix warning if no refclocks, add comment
Hal Murray
gitlab at mg.gitlab.com
Wed Jul 6 22:09:56 UTC 2016
Hal Murray pushed to branch master at NTPsec / ntpsec
Commits:
d6fb211b by Hal Murray at 2016-07-06T15:09:21-07:00
Fix warning if no refclocks, add comment
- - - - -
1 changed file:
- ntpd/ntp_config.c
Changes:
=====================================
ntpd/ntp_config.c
=====================================
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -3157,7 +3157,12 @@ config_peers(
SET_PORT(&peeraddr, NTP_PORT);
if (is_sane_resolved_address(&peeraddr,
curr_peer->host_mode)) {
+#ifdef REFCLOCK
+ /* save maxpoll from config line
+ * newpeer smashes it
+ */
uint8_t maxpoll = curr_peer->maxpoll;
+#endif
struct peer *peer = peer_config(
&peeraddr,
NULL,
@@ -3183,6 +3188,9 @@ config_peers(
* have requirements for this.
*/
if (maxpoll == 0)
+ /* default maxpoll for
+ * refclocks is minpoll
+ */
peer->maxpoll = peer->minpoll;
clktype = (uint8_t)REFCLOCKTYPE(&peer->srcadr);
unit = REFCLOCKUNIT(&peer->srcadr);
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/d6fb211b8b3d7038b61f0357e9be3c40dba7ffbb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160706/b4555189/attachment.html>
More information about the vc
mailing list