fix a bug (reported by Greg Morris) caused by code cleanup (blame it on me):
authorUlf Lamping <ulf.lamping@web.de>
Thu, 13 Jan 2005 20:19:49 +0000 (20:19 -0000)
committerUlf Lamping <ulf.lamping@web.de>
Thu, 13 Jan 2005 20:19:49 +0000 (20:19 -0000)
as the total packet count wasn't updated, the capture_info dialog wasn't updated accordingly

svn path=/trunk/; revision=13021

capture_loop.c

index 4c7dc3a7c1fa6298fcd087bdf3f3a08246f17399..fdad9599b48167387fc208458598ac2e9066456a 100644 (file)
@@ -1390,7 +1390,8 @@ capture_loop_packet_cb(guchar *user, const struct pcap_pkthdr *phdr,
   int err;
 
   /* if the user told us to stop after x packets, do we have enough? */
-  if ((ld->packets_max > 0) && (++ld->counts.total >= ld->packets_max))
+  ld->counts.total++;
+  if ((ld->packets_max > 0) && (ld->counts.total >= ld->packets_max))
   {
      ld->go = FALSE;
   }