Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tcpdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -3328,8 +3328,11 @@ dump_packet_and_trunc(u_char *user, const struct pcap_pkthdr *h, const u_char *s

Cflag_count++;
if (Wflag > 0) {
if (Cflag_count >= Wflag)
if (Cflag_count >= Wflag) {
Cflag_count = 0;
pcap_breakloop(dump_info->pd);
goto end;
}
}
if (dump_info->CurrentFileName != NULL)
free(dump_info->CurrentFileName);
Expand All @@ -3349,6 +3352,7 @@ dump_packet_and_trunc(u_char *user, const struct pcap_pkthdr *h, const u_char *s
if (dump_info->ndo != NULL)
pretty_print_packet(dump_info->ndo, h, sp, packets_captured);

end:
--infodelay;
if (infoprint)
info(0);
Expand Down