From: Danny Mayer Date: Thu, 16 Feb 2006 04:21:06 +0000 (-0500) Subject: Fix next references for recvbuf X-Git-Tag: NTP_4_2_0B_RC1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=427c3e4e24619fdb777193367d568f1f45120455;p=thirdparty%2Fntp.git Fix next references for recvbuf bk: 43f3fdb24Uhw0w70cQQ9HcBPtbhIPg --- diff --git a/ntpd/ntpsim.c b/ntpd/ntpsim.c index 73bdb6739..b695456eb 100644 --- a/ntpd/ntpsim.c +++ b/ntpd/ntpsim.c @@ -202,11 +202,12 @@ ntptmr( /* * Process buffers received. They had better be in order by - * receive timestamp. + * receive timestamp. Note that there are no additional buffers + * in the current implementation of ntpsim. */ while (n->rbuflist != NULL) { rbuf = n->rbuflist; - n->rbuflist = rbuf->next; + n->rbuflist = NULL; (rbuf->receiver)(rbuf); free(rbuf); } @@ -270,7 +271,6 @@ int srvr_rply( if ((rbuf.dstadr = malloc(sizeof(struct interface))) == NULL) abortsim("server-malloc"); memcpy(rbuf.dstadr, inter, sizeof(struct interface)); - rbuf.next = NULL; /* * Very carefully predict the time of arrival for the received @@ -306,20 +306,14 @@ netpkt( memcpy(rbuf, &e.rcv_buf, sizeof(struct recvbuf)); rbuf->receiver = receive; DTOLFP(n->ntp_time, &rbuf->recv_time); - rbuf->next = NULL; obuf = n->rbuflist; /* * In the present incarnation, no more than one buffer can be on - * the queue; however, we sniff the queue anyway as a hint for - * further development. + * the queue; */ if (obuf == NULL) { n->rbuflist = rbuf; - } else { - while (obuf->next != NULL) - obuf = obuf->next; - obuf->next = rbuf; } }