[ntp:questions] Ignore one server except in extreme conditions?

Dave Hart hart at ntp.org
Thu Nov 17 07:06:06 UTC 2011


Ooops, see corrected suggested code:

On Thu, Nov 17, 2011 at 07:02, Dave Hart <hart at ntp.org> wrote:
> change the if block to:
>
>        if (-1 == pps_fd) {
>                pps_fd = pp->io.fd;
>                msyslog(LOG_WARNING, "%s cannot open %s: %d %m",
>                        refnumtoa(&peer->srcadr), errno);
>        }
>
> And try again, so we can narrow down the reason for the failure.

That should be:

        if (-1 == pps_fd) {
                pps_fd = pp->io.fd;
                msyslog(LOG_WARNING, "%s cannot open %s: %d %m",
                        refnumtoa(&peer->srcadr), device, errno);
        }

The version above left out device.  There is still one more format
specifier than argument, %m, but it doesn't consume an argument.

Red faced,
Dave Hart


More information about the questions mailing list