/*
* 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);
}
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
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;
}
}