]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Fix a minor bug in the ack packet printing.
authorkenh <kenh>
Wed, 9 Feb 2000 16:29:00 +0000 (16:29 +0000)
committerkenh <kenh>
Wed, 9 Feb 2000 16:29:00 +0000 (16:29 +0000)
print-rx.c

index 0a607843ac51305a3ff64093de9935d2415b4fb3..85639468d0264fe96912a4d14007d09581de438f 100644 (file)
@@ -13,7 +13,7 @@
 
 #ifndef lint
 static const char rcsid[] =
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.9 2000-02-09 16:00:50 kenh Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.10 2000-02-09 16:29:00 kenh Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -2357,9 +2357,11 @@ rx_ack_print(register const u_char *bp, int length)
                                 * the _previous_ packet number seperated
                                 * from the first by a dash (-).  Since we
                                 * already printed the first packet above,
                                 * the _previous_ packet number seperated
                                 * from the first by a dash (-).  Since we
                                 * already printed the first packet above,
-                                * just print the final packet.
+                                * just print the final packet.  Don't
+                                * do this if there will be a single-length
+                                * range.
                                 */
                                 */
-                       } else if (last == i - 1)
+                       } else if (last == i - 1 && start != last)
                                printf("-%d", rxa->firstPacket + i - 1);
                
                /*
                                printf("-%d", rxa->firstPacket + i - 1);
                
                /*
@@ -2391,7 +2393,7 @@ rx_ack_print(register const u_char *bp, int length)
                                        start = i;
                                }
                                last = i;
                                        start = i;
                                }
                                last = i;
-                       } else if (last == i - 1)
+                       } else if (last == i - 1 && start != last)
                                printf("-%d", rxa->firstPacket + i - 1);
                
                if (last == i - 1 && start != last)
                                printf("-%d", rxa->firstPacket + i - 1);
                
                if (last == i - 1 && start != last)