[Git][NTPsec/ntpsec][master] 2 commits: Fix another warning.
Hal Murray
gitlab at mg.gitlab.com
Tue Dec 1 12:54:58 UTC 2015
Hal Murray pushed to branch master at NTPsec / ntpsec
Commits:
4a56b232 by Hal Murray at 2015-12-01T04:32:42Z
Fix another warning.
- - - - -
31ef9f20 by Hal Murray at 2015-12-01T04:53:51Z
Blush. Fix screwup in ntp_proto.c in recent push.
- - - - -
3 changed files:
- ntpd/ntp_proto.c
- ntpd/refclock_palisade.c
- ntpd/refclock_palisade.h
Changes:
=====================================
ntpd/ntp_proto.c
=====================================
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -1580,7 +1580,6 @@ process_packet(
pleap = PKT_LEAP(pkt->li_vn_mode);
pversion = PKT_VERSION(pkt->li_vn_mode);
pstratum = PKT_TO_STRATUM(pkt->stratum);
- if (peer->outcount) peer->outcount--; /* dup, peer with shorter poll */
/*
* Capture the header values in the client/peer association..
@@ -1589,7 +1588,7 @@ process_packet(
&peer->dstadr->sin : NULL,
&p_org, &p_rec, &p_xmt, &peer->dst,
pleap, pversion, pmode, pstratum, pkt->ppoll, pkt->precision,
- p_del, p_disp, pkt->refid, peer->outcount);
+ p_del, p_disp, pkt->refid);
peer->leap = pleap;
peer->stratum = min(pstratum, STRATUM_UNSPEC);
peer->pmode = pmode;
@@ -1598,7 +1597,6 @@ process_packet(
peer->rootdisp = p_disp;
peer->refid = pkt->refid; /* network byte order */
peer->reftime = p_reftime;
- peer->outcount = 0;
/*
* First, if either burst mode is armed, enable the burst.
@@ -3121,7 +3119,6 @@ peer_xmit(
intercept_sendpkt(__func__, &peer->srcadr, peer->dstadr, sys_ttl[peer->ttl],
&xpkt, sendlen);
peer->sent++;
- peer->outcount++;
peer->throttle += (1 << peer->minpoll) - 2;
/*
=====================================
ntpd/refclock_palisade.c
=====================================
--- a/ntpd/refclock_palisade.c
+++ b/ntpd/refclock_palisade.c
@@ -1095,7 +1095,7 @@ palisade_io (
else if (up->rpt_status == TSIP_PARSED_EMPTY)
up->rpt_cnt = 0;
- else if (up->rpt_cnt > BMAX)
+ else if (up->rpt_cnt > sizeof(up->rpt_buf))
up->rpt_status =TSIP_PARSED_EMPTY;
if (up->rpt_status == TSIP_PARSED_FULL)
=====================================
ntpd/refclock_palisade.h
=====================================
--- a/ntpd/refclock_palisade.h
+++ b/ntpd/refclock_palisade.h
@@ -125,7 +125,7 @@ struct palisade_unit {
int polled; /* flag to detect noreplies */
char leap_status; /* leap second flag */
char rpt_status; /* TSIP Parser State */
- short rpt_cnt; /* TSIP packet length so far */
+ size_t rpt_cnt; /* TSIP packet length so far */
char rpt_buf[BMAX]; /* packet assembly buffer */
int type; /* Clock mode type */
int month; /* for LEAP filter */
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/1658d055daf2d83ed0271ce77c7be9098be1c77e...31ef9f20bcabb2853382ea13ab873c6e351203d3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20151201/8b8fbb7b/attachment.html>
More information about the vc
mailing list