[Git][NTPsec/ntpsec][master] record_raw_stats() never sees clock data, so simplify life.
Eric S. Raymond
gitlab at mg.gitlab.com
Fri Jul 8 04:54:21 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
965462b9 by Eric S. Raymond at 2016-07-08T00:53:50-04:00
record_raw_stats() never sees clock data, so simplify life.
- - - - -
3 changed files:
- include/ntpd.h
- ntpd/ntp_proto.c
- ntpd/ntp_util.c
Changes:
=====================================
include/ntpd.h
=====================================
--- a/include/ntpd.h
+++ b/include/ntpd.h
@@ -254,7 +254,7 @@ extern void record_loop_stats (double, double, double, double, int);
extern void record_clock_stats (struct peer *, const char *);
extern int mprintf_clock_stats(struct peer *, const char *, ...)
NTP_PRINTF(2, 3);
-extern void record_raw_stats (const struct peer *, sockaddr_u *srcadr, sockaddr_u *dstadr, l_fp *t1, l_fp *t2, l_fp *t3, l_fp *t4, int leap, int version, int mode, int stratum, int ppoll, int precision, double root_delay, double root_dispersion, uint32_t refid, u_int outcount);
+extern void record_raw_stats (sockaddr_u *srcadr, sockaddr_u *dstadr, l_fp *t1, l_fp *t2, l_fp *t3, l_fp *t4, int leap, int version, int mode, int stratum, int ppoll, int precision, double root_delay, double root_dispersion, uint32_t refid, u_int outcount);
extern void check_leap_file (int is_daily_check, uint32_t ntptime, const time_t * systime);
extern void record_crypto_stats (sockaddr_u *, const char *);
#ifdef DEBUG
=====================================
ntpd/ntp_proto.c
=====================================
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -1302,7 +1302,7 @@ process_packet(
/*
* Capture the header values in the client/peer association..
*/
- record_raw_stats(peer, &peer->srcadr, peer->dstadr ?
+ record_raw_stats(&peer->srcadr, peer->dstadr ?
&peer->dstadr->sin : NULL,
&p_org, &p_rec, &p_xmt, &peer->dst,
pleap, pversion, pmode, pstratum, pkt->ppoll, pkt->precision,
=====================================
ntpd/ntp_util.c
=====================================
--- a/ntpd/ntp_util.c
+++ b/ntpd/ntp_util.c
@@ -538,7 +538,6 @@ mprintf_clock_stats(
*/
void
record_raw_stats(
- const struct peer *peer,
sockaddr_u *srcadr,
sockaddr_u *dstadr,
l_fp *t1, /* originate timestamp */
@@ -561,8 +560,6 @@ record_raw_stats(
l_fp now;
u_long day;
- UNUSED_ARG(srcadr);
-
if (!stats_control)
return;
@@ -573,7 +570,7 @@ record_raw_stats(
if (rawstats.fp != NULL) {
fprintf(rawstats.fp, "%lu %s %s %s %s %s %s %s %d %d %d %d %d %d %.6f %.6f %s %d\n",
day, ulfptoa(&now, 3),
- peerlabel(peer), dstadr ? stoa(dstadr) : "-",
+ stoa(srcadr), dstadr ? stoa(dstadr) : "-",
ulfptoa(t1, 9), ulfptoa(t2, 9),
ulfptoa(t3, 9), ulfptoa(t4, 9),
leap, version, mode, stratum, ppoll, precision,
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/965462b9f5ba861268e60ca4a0567f6b5c7eba39
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160708/8e050861/attachment.html>
More information about the vc
mailing list