]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Fix next references for recvbuf
authorDanny Mayer <mayer@ntp.org>
Thu, 16 Feb 2006 04:21:06 +0000 (23:21 -0500)
committerDanny Mayer <mayer@ntp.org>
Thu, 16 Feb 2006 04:21:06 +0000 (23:21 -0500)
bk: 43f3fdb24Uhw0w70cQQ9HcBPtbhIPg

ntpd/ntpsim.c

index 73bdb6739b56d568b10ca3f63fd7bc95416adb31..b695456eba2a06171cddde95b6f3b965b3b31771 100644 (file)
@@ -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;
        }
 }