[ntp:bk-ntp-dev-send] BitKeeper patch

Harlan Stenn stenn at mail.eecis.udel.edu
Thu May 4 09:46:11 UTC 2006


This BitKeeper patch contains the following changesets:
stenn at pogo.udel.edu|ChangeSet|20060504094213|43943
kardel at pogo.udel.edu|ChangeSet|20060502091340|32599
kardel at pogo.udel.edu|ChangeSet|20060501182754|32600

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# ID:	stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
# User:	stenn
# Host:	deacon.udel.edu
# Root:	/deacon/backroom/ntp-dev

#
#--- 1.19/libntp/recvbuff.c	2005-12-20 23:16:13 -05:00
#+++ 1.20/libntp/recvbuff.c	2006-05-01 14:18:25 -04:00
#@@ -175,16 +175,11 @@
# {
# 	recvbuf_t *rbuf;
# 
#-	if (0 == full_recvbufs)
#-	    return 0;
#-
#+	LOCK();
# #ifdef DEBUG
# 	if (debug > 1 && full_recvbufs)
# 	    printf("get_full_recv_buffer() called and full_recvbufs is %lu\n", full_recvbufs);
# #endif
#-	if (0 == full_recvbufs)
#-	    msyslog(LOG_ERR, "get_full_recv_buffer() called but full_recvbufs is 0!");
#-	LOCK();
# 	rbuf = ISC_LIST_HEAD(full_list);
# 	if (rbuf != NULL)
# 	{
#@@ -193,12 +188,10 @@
# 	}
# 	else
# 	{
#-		if (full_recvbufs)
#+		if (full_recvbufs) {
# 		    msyslog(LOG_ERR, "get_full_recv_buffer: full_list is empty but full_recvbufs is %lu!", full_recvbufs);
#-		/*
#-		 * Make sure we reset the full count to 0
#-		 */
#-		full_recvbufs = 0;
#+		    abort();
#+		}
# 	}
# 	UNLOCK();
# 	return (rbuf);
#
#--- 1.110/ntpd/ntp_crypto.c	2006-03-18 04:11:14 -05:00
#+++ 1.111/ntpd/ntp_crypto.c	2006-05-02 05:12:16 -04:00
#@@ -3336,7 +3336,7 @@
# 
# 	ptr = (u_char *)cinf->cert.ptr;
# 	cert = d2i_X509(NULL, &ptr, ntohl(cinf->cert.vallen));
#-	if (!X509_verify(cert, pkey))
#+	if (cert == NULL || !X509_verify(cert, pkey))
# 		return (XEVNT_VFY);
# 
# 	X509_free(cert);
#
#--- 1.80/ntpd/ntpd.c	2006-03-15 02:28:45 -05:00
#+++ 1.81/ntpd/ntpd.c	2006-05-01 14:21:28 -04:00
#@@ -889,14 +889,13 @@
# 		block_io_and_alarm();
# # endif
# 
#-		tot_full_recvbufs = full_recvbuffs();	/* get received buffers */
# 		if (alarm_flag) 	/* alarmed? */
# 		{
# 			was_alarmed = 1;
# 			alarm_flag = 0;
# 		}
# 
#-		if (!was_alarmed && tot_full_recvbufs == 0)
#+		if (!was_alarmed && has_full_recv_buffer() == ISC_FALSE)
# 		{
# 			/*
# 			 * Nothing to do.  Wait for something.
#@@ -939,42 +938,56 @@
# 				was_alarmed = 1;
# 				alarm_flag = 0;
# 			}
#-			tot_full_recvbufs = full_recvbuffs();  /* get received buffers */
# 		}
#-# ifdef HAVE_SIGNALED_IO
#-		unblock_io_and_alarm();
#-# endif /* HAVE_SIGNALED_IO */
# 
#-		/*
#-		 * Out here, signals are unblocked.  Call timer routine
#-		 * to process expiry.
#-		 */
# 		if (was_alarmed)
# 		{
#+# ifdef HAVE_SIGNALED_IO
#+			unblock_io_and_alarm();
#+# endif /* HAVE_SIGNALED_IO */
#+			/*
#+			 * Out here, signals are unblocked.  Call timer routine
#+			 * to process expiry.
#+			 */
# 			timer();
# 			was_alarmed = 0;
#+# ifdef HAVE_SIGNALED_IO
#+                        block_io_and_alarm();
#+# endif /* HAVE_SIGNALED_IO */
# 		}
# 
# #endif /* HAVE_IO_COMPLETION_PORT */
# 
#-		while (full_recvbuffs())
#+		rbuf = get_full_recv_buffer();
#+		while (rbuf != NULL)
# 		{
#+# ifdef HAVE_SIGNALED_IO
#+			unblock_io_and_alarm();
#+# endif /* HAVE_SIGNALED_IO */
# 			/*
# 			 * Call the data procedure to handle each received
# 			 * packet.
# 			 */
#-			rbuf = get_full_recv_buffer();
# 			if (rbuf != NULL)	/* This should always be true */
# 			{
# 				(rbuf->receiver)(rbuf);
# 				freerecvbuf(rbuf);
#+			} else {
#+				 msyslog(LOG_ERR, "receive buffer corruption - receiver found to be NULL - ABORTING");
#+				 abort();
# 			}
#+# ifdef HAVE_SIGNALED_IO
#+                        block_io_and_alarm();
#+# endif /* HAVE_SIGNALED_IO */
# 		}
# 
# 		/*
# 		 * Go around again
# 		 */
# 	}
#+# ifdef HAVE_SIGNALED_IO
#+	unblock_io_and_alarm();
#+# endif /* HAVE_SIGNALED_IO */
# 	return 1;
# }
# 
#
#--- 1.41/ntpd/refclock_parse.c	2006-03-17 20:11:00 -05:00
#+++ 1.42/ntpd/refclock_parse.c	2006-05-01 14:22:34 -04:00
#@@ -1,7 +1,7 @@
# /*
#- * /src/NTP/REPOSITORY/ntp4-dev/ntpd/refclock_parse.c,v 4.66 2006/03/18 00:45:30 kardel RELEASE_20060318_A
#+ * /src/NTP/REPOSITORY/ntp4-dev/ntpd/refclock_parse.c,v 4.68 2006/05/01 17:02:51 kardel RELEASE_20060501_A
#  *
#- * refclock_parse.c,v 4.66 2006/03/18 00:45:30 kardel RELEASE_20060318_A
#+ * refclock_parse.c,v 4.68 2006/05/01 17:02:51 kardel RELEASE_20060501_A
#  *
#  * generic reference clock driver for several DCF/GPS/MSF/... receivers
#  *
#@@ -180,8 +180,9 @@
# #include "binio.h"
# #include "ascii.h"
# #include "ieee754io.h"
#+#include "recvbuff.h"
# 
#-static char rcsid[] = "refclock_parse.c,v 4.66 2006/03/18 00:45:30 kardel RELEASE_20060318_A";
#+static char rcsid[] = "refclock_parse.c,v 4.68 2006/05/01 17:02:51 kardel RELEASE_20060501_A";
# 
# /**===========================================================================
#  ** external interface to ntp mechanism
#@@ -2020,7 +2021,7 @@
# 	{
# 		if (parse_ioread(&parse->parseio, (unsigned int)(*s++), &ts))
# 		{
#-			struct recvbuf buf;
#+			struct recvbuf *buf;
# 
# 			/*
# 			 * got something good to eat
#@@ -2171,20 +2172,25 @@
# #endif /* TIOCDCDTIMESTAMP */
# #endif /* HAVE_PPSAPI */
# 			}
#-			if (count)
#-			{	/* simulate receive */
#-				memmove((caddr_t)buf.recv_buffer,
#-					(caddr_t)&parse->parseio.parse_dtime,
#-					sizeof(parsetime_t));
#-				parse_iodone(&parse->parseio);
#-				buf.recv_length = sizeof(parsetime_t);
#-				buf.recv_time = rbufp->recv_time;
#-				buf.srcadr = rbufp->srcadr;
#-				buf.dstadr = rbufp->dstadr;
#-				buf.fd     = rbufp->fd;
#-				buf.X_from_where = rbufp->X_from_where;
#-				rbufp->receiver(&buf);
#-			}
#+
#+  			if (count)
#+  			{	/* simulate receive */
#+				buf = get_free_recv_buffer();
#+				if (buf != NULL) {
#+					memmove((caddr_t)buf->recv_buffer,
#+						(caddr_t)&parse->parseio.parse_dtime,
#+						sizeof(parsetime_t));
#+					buf->recv_length  = sizeof(parsetime_t);
#+					buf->recv_time    = rbufp->recv_time;
#+					buf->srcadr       = rbufp->srcadr;
#+					buf->dstadr       = rbufp->dstadr;
#+					buf->receiver     = rbufp->receiver;
#+					buf->fd           = rbufp->fd;
#+					buf->X_from_where = rbufp->X_from_where;
#+					add_full_recv_buffer(buf);
#+				}
#+  				parse_iodone(&parse->parseio);
#+  			}
# 			else
# 			{
# 				memmove((caddr_t)rbufp->recv_buffer,
#@@ -5672,6 +5678,15 @@
#  * History:
#  *
#  * refclock_parse.c,v
#+ * Revision 4.68  2006/05/01 17:02:51  kardel
#+ * copy receiver method also for newlwy created receive buffers
#+ *
#+ * Revision 4.67  2006/05/01 14:37:29  kardel
#+ * If an input buffer parses into more than one message do insert the
#+ * parsed message in a new input buffer instead of processing it
#+ * directly. This avoids deed complicated processing in signal
#+ * handling.
#+ *
#  * Revision 4.66  2006/03/18 00:45:30  kardel
#  * coverity fixes found in NetBSD coverity scan
#  *
#

# Diff checksum=1db6e3f3


# Patch vers:	1.3
# Patch type:	REGULAR

== ChangeSet ==
stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
stenn at whimsy.udel.edu|ChangeSet|20060421040943|32614
D 1.1499 06/05/01 18:27:54+00:00 kardel at pogo.udel.edu +3 -0
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c refclock_parse.c:
c   If an input buffer parses into more than one message do insert the
c   parsed message in a new input buffer instead of processing it
c   directly. This avoids deed complicated processing in signal
c   handling.
c ntpd.c:
c   re-instate vital io blocking protocol to insure
c   that receive buffer queue is only manipulated when
c   io is blocked
c recvbuff.c:
c   cleanup get_full_recvbuffer() to decide only the full queue head
c   and simplify code (remove multiple tests)
K 32600
P ChangeSet
------------------------------------------------

0a0
> stenn at whimsy.udel.edu|libntp/recvbuff.c|19990721005052|03868|06470f1c kardel at pogo.udel.edu|libntp/recvbuff.c|20060501181825|53844
> stenn at whimsy.udel.edu|ntpd/ntpd.c|19990526004817|01635|3aed0663 kardel at pogo.udel.edu|ntpd/ntpd.c|20060501182128|06371
> stenn at whimsy.udel.edu|ntpd/refclock_parse.c|19990526004818|01635|3aed0663 kardel at pogo.udel.edu|ntpd/refclock_parse.c|20060501182234|08335

kardel at pogo.udel.edu|ChangeSet|20060501182754|32600
D 1.1500 06/05/02 09:13:40+00:00 kardel at pogo.udel.edu +1 -0
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c ntp_crypto.c:
c   handle NULL return from d2i_X509() - NetBSD Run 21 Coverity CID 2979
K 32599
P ChangeSet
------------------------------------------------

0a0
> stenn at whimsy.udel.edu|ntpd/ntp_crypto.c|20000314033844|01769|47dd06e9 kardel at pogo.udel.edu|ntpd/ntp_crypto.c|20060502091216|54046

kardel at pogo.udel.edu|ChangeSet|20060502091340|32599
D 1.1501 06/05/04 05:42:13-04:00 stenn at pogo.udel.edu +0 -0
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c Merge bk://www.ntp.org/home/bk/ntp-dev
c into  pogo.udel.edu:/pogo/users/kardel/main-line/ntp-dev
i stenn at deacon.udel.edu|ChangeSet|20060504093851|43958
K 43943
M stenn at deacon.udel.edu|ChangeSet|20060504093851|43958
P ChangeSet
------------------------------------------------


== libntp/recvbuff.c ==
stenn at whimsy.udel.edu|libntp/recvbuff.c|19990721005052|03868|06470f1c
stenn at pogo.udel.edu|libntp/recvbuff.c|20051221041613|04313
D 1.20 06/05/01 18:18:25+00:00 kardel at pogo.udel.edu +4 -11
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c cleanup get_full_recvbuffer() to decide only the full queue head
c and simplify code (remove multiple tests)
K 53844
O -rw-rw-r--
P libntp/recvbuff.c
------------------------------------------------

D178 3
I180 1
	LOCK();
D185 3
D196 1
I196 1
		if (full_recvbufs) {
D198 4
I201 2
		    abort();
		}

== ntpd/ntp_crypto.c ==
stenn at whimsy.udel.edu|ntpd/ntp_crypto.c|20000314033844|01769|47dd06e9
kardel at pogo.udel.edu|ntpd/ntp_crypto.c|20060318091114|52803
D 1.111 06/05/02 09:12:16+00:00 kardel at pogo.udel.edu +1 -1
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c handle NULL return from d2i_X509() - NetBSD Run 21 Coverity CID 2979
K 54046
O -rw-rw-r--
P ntpd/ntp_crypto.c
------------------------------------------------

D3339 1
I3339 1
	if (cert == NULL || !X509_verify(cert, pkey))

== ntpd/ntpd.c ==
stenn at whimsy.udel.edu|ntpd/ntpd.c|19990526004817|01635|3aed0663
stenn at deacon.udel.edu|ntpd/ntpd.c|20060315072845|48724
D 1.81 06/05/01 18:21:28+00:00 kardel at pogo.udel.edu +25 -12
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c re-instate vital io blocking protocol to insure
c that receive buffer queue is only manipulated when
c io is blocked
K 6371
O -rw-rw-r--
P ntpd/ntpd.c
------------------------------------------------

D892 1
D899 1
I899 1
		if (!was_alarmed && has_full_recv_buffer() == ISC_FALSE)
D942 1
D944 3
D948 4
I953 7
# ifdef HAVE_SIGNALED_IO
			unblock_io_and_alarm();
# endif /* HAVE_SIGNALED_IO */
			/*
			 * Out here, signals are unblocked.  Call timer routine
			 * to process expiry.
			 */
I955 3
# ifdef HAVE_SIGNALED_IO
                        block_io_and_alarm();
# endif /* HAVE_SIGNALED_IO */
D960 1
I960 2
		rbuf = get_full_recv_buffer();
		while (rbuf != NULL)
I961 3
# ifdef HAVE_SIGNALED_IO
			unblock_io_and_alarm();
# endif /* HAVE_SIGNALED_IO */
D966 1
I970 3
			} else {
				 msyslog(LOG_ERR, "receive buffer corruption - receiver found to be NULL - ABORTING");
				 abort();
I971 3
# ifdef HAVE_SIGNALED_IO
                        block_io_and_alarm();
# endif /* HAVE_SIGNALED_IO */
I977 3
# ifdef HAVE_SIGNALED_IO
	unblock_io_and_alarm();
# endif /* HAVE_SIGNALED_IO */

== ntpd/refclock_parse.c ==
stenn at whimsy.udel.edu|ntpd/refclock_parse.c|19990526004818|01635|3aed0663
kardel at pogo.udel.edu|ntpd/refclock_parse.c|20060318011100|31639
D 1.42 06/05/01 18:22:34+00:00 kardel at pogo.udel.edu +33 -18
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c If an input buffer parses into more than one message do insert the
c parsed message in a new input buffer instead of processing it
c directly. This avoids deed complicated processing in signal
c handling.
K 8335
O -rw-rw-r--
P ntpd/refclock_parse.c
------------------------------------------------

D2 1
I2 1
 * /src/NTP/REPOSITORY/ntp4-dev/ntpd/refclock_parse.c,v 4.68 2006/05/01 17:02:51 kardel RELEASE_20060501_A
D4 1
I4 1
 * refclock_parse.c,v 4.68 2006/05/01 17:02:51 kardel RELEASE_20060501_A
I182 1
#include "recvbuff.h"
D184 1
I184 1
static char rcsid[] = "refclock_parse.c,v 4.68 2006/05/01 17:02:51 kardel RELEASE_20060501_A";
D2023 1
I2023 1
			struct recvbuf *buf;
D2174 14
I2187 19
\
  			if (count)
  			{	/* simulate receive */
				buf = get_free_recv_buffer();
				if (buf != NULL) {
					memmove((caddr_t)buf->recv_buffer,
						(caddr_t)&parse->parseio.parse_dtime,
						sizeof(parsetime_t));
					buf->recv_length  = sizeof(parsetime_t);
					buf->recv_time    = rbufp->recv_time;
					buf->srcadr       = rbufp->srcadr;
					buf->dstadr       = rbufp->dstadr;
					buf->receiver     = rbufp->receiver;
					buf->fd           = rbufp->fd;
					buf->X_from_where = rbufp->X_from_where;
					add_full_recv_buffer(buf);
				}
  				parse_iodone(&parse->parseio);
  			}
I5674 9
 * Revision 4.68  2006/05/01 17:02:51  kardel
 * copy receiver method also for newlwy created receive buffers
 *
 * Revision 4.67  2006/05/01 14:37:29  kardel
 * If an input buffer parses into more than one message do insert the
 * parsed message in a new input buffer instead of processing it
 * directly. This avoids deed complicated processing in signal
 * handling.
 *

# Patch checksum=cf4ab6bd


More information about the bk-ntp-dev-send mailing list