aboutsummaryrefslogtreecommitdiffstats
path: root/dumpcap.c
diff options
context:
space:
mode:
authorChuck Craft <bubbasnmp@gmail.com>2021-03-13 18:28:14 -0600
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-10-12 06:37:46 +0000
commitfefad2e7cfca011ce91beb0db01add6a7a396c33 (patch)
tree901964ba57c7d5db59c170bfef45bbebc3e5b67d /dumpcap.c
parent634650f1e421e70c193d4eb1f1e91c13cb6bac79 (diff)
dumpcap: double received count when using threads
Closes #17089
Diffstat (limited to 'dumpcap.c')
-rw-r--r--dumpcap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dumpcap.c b/dumpcap.c
index eb6272acf2..43d85b63f8 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -4475,7 +4475,9 @@ static void
capture_loop_wrote_one_packet(capture_src *pcap_src) {
global_ld.packets_captured++;
global_ld.packets_written++;
- pcap_src->received++;
+ if (!use_threads) {
+ pcap_src->received++;
+ }
/* check -c NUM / -a packets:NUM */
if (global_capture_opts.has_autostop_packets && global_ld.packets_captured >= global_capture_opts.autostop_packets) {