diff options
author | Garrett Wollman <wollman@FreeBSD.org> | 1994-04-03 19:50:51 +0000 |
---|---|---|
committer | Garrett Wollman <wollman@FreeBSD.org> | 1994-04-03 19:50:51 +0000 |
commit | a7b3b2eb3681da0fa616a9dfcbdc1637850e0829 (patch) | |
tree | cc2bb39b7113fd0113d49043ae35157787b5482b /usr.sbin/xntpd/parse/parse.c | |
parent | b9eb1bdbc43bbeeeabbdfcd521834d1fba15346d (diff) | |
download | src-a7b3b2eb3681da0fa616a9dfcbdc1637850e0829.tar.gz src-a7b3b2eb3681da0fa616a9dfcbdc1637850e0829.zip |
xntp 3.3p from Delaware
Notes
Notes:
svn path=/vendor/ntpd/dist/; revision=1328
Diffstat (limited to 'usr.sbin/xntpd/parse/parse.c')
-rw-r--r-- | usr.sbin/xntpd/parse/parse.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/usr.sbin/xntpd/parse/parse.c b/usr.sbin/xntpd/parse/parse.c index ed5fd9a8fad7..dd70f1d85698 100644 --- a/usr.sbin/xntpd/parse/parse.c +++ b/usr.sbin/xntpd/parse/parse.c @@ -1,8 +1,8 @@ #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) /* - * /src/NTP/REPOSITORY/v3/parse/parse.c,v 3.19 1994/01/25 19:05:20 kardel Exp + * /src/NTP/REPOSITORY/v3/parse/parse.c,v 3.22 1994/02/25 12:34:49 kardel Exp * - * parse.c,v 3.19 1994/01/25 19:05:20 kardel Exp + * parse.c,v 3.22 1994/02/25 12:34:49 kardel Exp * * Parser module for reference clock * @@ -556,6 +556,9 @@ parse_to_unixtime(clock, cvtrtc) register int i; time_t t; + if (clock->utctime) + return clock->utctime; /* if the conversion routine gets it right away - why not */ + if (clock->year < 100) clock->year += 1900; @@ -628,6 +631,9 @@ parse_to_unixtime(clock, cvtrtc) t += clock->utcoffset; /* warp to UTC */ /* done */ + + clock->utctime = t; /* documentray only */ + return t; } @@ -890,6 +896,8 @@ timepacket(parseio) if (parseio->parse_flags & PARSE_FIXED_FMT) { + clock.utctime = 0; + switch ((cvtrtc = clockformats[format]->convert ? clockformats[format]->convert(parseio->parse_data, parseio->parse_index, clockformats[format]->data, &clock) : CVT_NONE) & CVT_MASK) { case CVT_FAIL: @@ -941,6 +949,8 @@ timepacket(parseio) { do { + clock.utctime = 0; + switch ((cvtrtc = (clockformats[format]->convert && !(clockformats[format]->flags & CVT_FIXEDONLY)) ? clockformats[format]->convert(parseio->parse_data, parseio->parse_index, clockformats[format]->data, &clock) : CVT_NONE) & CVT_MASK) @@ -1148,6 +1158,12 @@ parse_setcs(dct, parse) * History: * * parse.c,v + * Revision 3.22 1994/02/25 12:34:49 kardel + * allow for converter generated utc times + * + * Revision 3.21 1994/02/02 17:45:30 kardel + * rcs ids fixed + * * Revision 3.19 1994/01/25 19:05:20 kardel * 94/01/23 reconcilation * |