From: Harlan Stenn Date: Sun, 3 Jun 2001 01:35:43 +0000 (-0000) Subject: ChangeLog, NEWS, notes.htm, ntp_refclock.c: X-Git-Tag: NTP_4_0_99M_RC3~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d5bedaf6b4965c76a08831d124054a2e19cea51;p=thirdparty%2Fntp.git ChangeLog, NEWS, notes.htm, ntp_refclock.c: * ntpd/ntp_refclock.c (refclock_open): Add O_CNOTTY to the open() flags when opening a serial port. Reported by: joseph lang * html/notes.htm: Typo fix. From: John Stone ChangeLog: Typo... bk: 3b19946feHslWoTyew0mKlOC9ZGtug --- diff --git a/ChangeLog b/ChangeLog index 39ba09be4..f42ba6768 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,17 @@ +2001-06-02 Harlan Stenn + + * ntpd/ntp_refclock.c (refclock_open): Add O_NOCTTY to the open() + flags when opening a serial port. + Reported by: joseph lang + 2001-05-31 Harlan Stenn + * html/notes.htm: Typo fix. + From: John Stone + * configure.in: 4.0.99m-rc1 - * html/monopt.htm: Typo. + * html/monopt.htm: Typo fix. * html/confopt.htm: Cruft removal. From: John Stone diff --git a/NEWS b/NEWS index 9806a0752..e8bfb7607 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ +* Huff-n-Puff filter * Preparation for OpenSSL support * Resolver changes/improvements are not backward compatible with mode 7 requests (which are implementation-specific anyway) diff --git a/html/notes.htm b/html/notes.htm index e9f648cd2..c3f1ee06e 100644 --- a/html/notes.htm +++ b/html/notes.htm @@ -724,7 +724,7 @@ for the original NTP specification, once called NTP Version 0.

Traffic Monitoring

ntpd handles peers whose stratum is higher than the stratum of -the local server and pollers using client mode by a fast path which +the local server and polls using client mode by a fast path which minimizes the work done in responding to their polls, and normally retains no memory diff --git a/ntpd/ntp_refclock.c b/ntpd/ntp_refclock.c index e8eb5f91c..2205b6ca2 100644 --- a/ntpd/ntp_refclock.c +++ b/ntpd/ntp_refclock.c @@ -682,16 +682,23 @@ refclock_open( #ifdef TIOCMGET u_long ltemp; #endif /* TIOCMGET */ + int omode; /* * Open serial port and set default options */ flags = lflags; + + omode = O_RDWR; #ifdef O_NONBLOCK - fd = open(dev, O_RDWR | O_NONBLOCK, 0777); -#else - fd = open(dev, O_RDWR, 0777); -#endif /* O_NONBLOCK */ + omode |= O_NONBLOCK; +#endif +#ifdef O_NOCTTY + omode |= O_NOCTTY; +#endif + + fd = open(dev, omode, 0777); + if (fd < 0) { msyslog(LOG_ERR, "refclock_open: %s: %m", dev); return (0);