dumpcap: double received count when using threads

Closes #17089
This commit is contained in:
Chuck Craft 2021-03-13 18:28:14 -06:00 committed by Wireshark GitLab Utility
parent 634650f1e4
commit fefad2e7cf
1 changed files with 3 additions and 1 deletions

View File

@ -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) {