Replied: Mon, 02 Jun 1997 21:14:39 -0400
Replied: "Juha Sarlin <juha@c3l.tyreso.se> Mills@huey.udel.edu"
Replied: Mon, 02 Jun 1997 18:29:41 -0400
Replied: "Juha Sarlin <juha@c3l.tyreso.se> Mills@huey.udel.edu"
Return-Path: juha@samuraj.c3l.tyreso.se 
Return-Path: <juha@samuraj.c3l.tyreso.se>
Received: from samuraj.c3l.tyreso.se (juha@samuraj.c3l.tyreso.se [195.100.55.2])
	by whimsy.udel.edu (8.8.5/8.8.5) with ESMTP id TAA29820
	for <stenn@whimsy.udel.edu>; Fri, 30 May 1997 19:01:37 GMT
Received: (from juha@localhost)
	by samuraj.c3l.tyreso.se (8.8.5/8.8.5) id VAA15394;
	Fri, 30 May 1997 21:01:24 +0200
Date: Fri, 30 May 1997 21:01:24 +0200
From: Juha Sarlin <juha@c3l.tyreso.se>
Message-Id: <199705301901.VAA15394@samuraj.c3l.tyreso.se>
To: Mills@huey.udel.edu
CC: stenn@whimsy.udel.edu
Subject: Another cutout fix for xntp3-5.90
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII

The loopfilter shouldn't try to adjust when abs(offset) >= .5 s,
because the fractional part of offset is used as a signed value and
a fraction >= .5 s has a reversed sign bit.

Here is a fix:

*** xntpd/ntp_loopfilter.c~	Fri May 30 20:24:17 1997
--- xntpd/ntp_loopfilter.c	Fri May 30 20:30:19 1997
***************
*** 239,242 ****
  	 */
! 	} else if (ftmp.l_ui > CLOCK_MAX_I || (ftmp.l_ui == CLOCK_MAX_I
! 	    && ftmp.l_uf >= CLOCK_MAX_F && !cutout)) {
  		tc_counter = 0;
--- 239,243 ----
  	 */
! 	} else if (ftmp.l_ui > CLOCK_MAX_I || ftmp.l_f < 0
! 		   || (ftmp.l_ui == CLOCK_MAX_I && ftmp.l_uf >= CLOCK_MAX_F
! 		       && !cutout)) {
  		tc_counter = 0;
