+* [Bug 2678] nmea_control() now checks 'refclock_params()' result.
(4.2.7p481) 2014/11/22 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 2314] Only enable PPS if kernel consumer binding succeeds.
* [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition.
if (-1 == up->ppsapi_fd)
up->ppsapi_fd = pp->io.fd;
if (refclock_ppsapi(up->ppsapi_fd, &up->atom)) {
- up->ppsapi_lit = TRUE;
/* use the PPS API for our own purposes now. */
- refclock_params(pp->sloppyclockflag, &up->atom);
+ up->ppsapi_lit = refclock_params(
+ pp->sloppyclockflag, &up->atom);
+ if (!up->ppsapi_lit) {
+ /* failed to configure, drop PPS unit */
+ time_pps_destroy(up->atom.handle);
+ msyslog(LOG_WARNING,
+ "%s set PPSAPI params fails",
+ refnumtoa(&peer->srcadr));
+ }
+ /* note: the PPS I/O handle remains valid until
+ * flag1 is cleared or the clock is shut down.
+ */
} else {
msyslog(LOG_WARNING,
"%s flag1 1 but PPSAPI fails",