From: Harlan Stenn Date: Tue, 30 Oct 2007 07:27:06 +0000 (-0500) Subject: ntpsim.c: add missing protypes and fix [CID 34], a nit X-Git-Tag: NTP_4_2_5P92~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df3bdea5a6007f5049c40b88e9a8e424be1c6b29;p=thirdparty%2Fntp.git ntpsim.c: add missing protypes and fix [CID 34], a nit bk: 4726dcca6jKdYHPZicUzRnly2qf-Yw --- diff --git a/ChangeLog b/ChangeLog index b0c2a80af..c03d2551f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* ntpsim.c: add missing protypes and fix [CID 34], a nit. * Upgraded bison at UDel. * Update br-flock and flock-build machine lists. * [Bug 752] QoS: add parse/config handling code. diff --git a/ntpd/ntpsim.c b/ntpd/ntpsim.c index a2259319d..4556f206c 100644 --- a/ntpd/ntpsim.c +++ b/ntpd/ntpsim.c @@ -31,6 +31,8 @@ void (*event_ptr[]) (Event *) = { /* Define a function to compare two events to determine which one occurs first */ +int determine_event_ordering(Event *e1, Event *e2); + int determine_event_ordering(Event *e1, Event *e2) { return (e1->time - e2->time); @@ -39,6 +41,8 @@ int determine_event_ordering(Event *e1, Event *e2) /* Define a function to compare two received packets to determine which one * is received first */ +int determine_recv_buf_ordering(struct recvbuf *b1, struct recvbuf *b2); + int determine_recv_buf_ordering(struct recvbuf *b1, struct recvbuf *b2) { double recv_time1, recv_time2; @@ -73,6 +77,8 @@ void create_server_associations() /* Main Simulator Code */ +int ntpsim(int argc, char *argv[]); + int ntpsim(int argc, char *argv[]) { Event *curr_event; @@ -286,6 +292,7 @@ int simulate_server( rbuf.receiver = receive; /* Function to call to process the packet */ rbuf.recv_length = LEN_PKT_NOMAC; rbuf.recv_pkt = xpkt; + rbuf.used = 1; memcpy(&rbuf.srcadr, serv_addr, sizeof(struct sockaddr_storage)); memcpy(&rbuf.recv_srcadr, serv_addr, sizeof(struct sockaddr_storage));