check sequence number
authorJim Bloom <bloom@ucbvax.Berkeley.EDU>
Sat, 12 Apr 1986 07:35:29 +0000 (23:35 -0800)
committerJim Bloom <bloom@ucbvax.Berkeley.EDU>
Sat, 12 Apr 1986 07:35:29 +0000 (23:35 -0800)
SCCS-vsn: usr.sbin/timed/timed/acksend.c 2.2

usr/src/usr.sbin/timed/timed/acksend.c

index 3751d48..80580af 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)acksend.c  2.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)acksend.c  2.2 (Berkeley) %G%";
 #endif not lint
 
 #include "globals.h"
 #endif not lint
 
 #include "globals.h"
@@ -63,6 +63,12 @@ struct netinfo *net;
                tout.tv_usec = USECFORACK;
                answer  = readmsg(ack, name, &tout, net);
                if (answer != NULL) {
                tout.tv_usec = USECFORACK;
                answer  = readmsg(ack, name, &tout, net);
                if (answer != NULL) {
+                       if (answer->tsp_seq != sequence) {
+                               if (trace)
+                                       fprintf(fd, "acksend: seq # %d != %d\n",
+                                           answer->tsp_seq, sequence);
+                               continue;
+                       }
                        flag = RECEIVED;
                } else {
                        flag = LOST;
                        flag = RECEIVED;
                } else {
                        flag = LOST;