Skip to content

Commit

Permalink
Use pcap_dump_flush instead of the underlying FILE*
Browse files Browse the repository at this point in the history
Crashes under Cygwin, see #1.
  • Loading branch information
thefloweringash committed May 18, 2017
1 parent 18d9bae commit 75b8331
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tzsp2pcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,8 @@ int main(int argc, char **argv) {
break;
}
if (flush_every_packet) {
if (fflush(pcap_dumper_file) != 0) {
perror("fflush");
if (pcap_dump_flush(pcap_dumper) != 0) {
fprintf(stderr, "error flushing via pcap_dump_flush\n");
break;
}
}
Expand Down

0 comments on commit 75b8331

Please sign in to comment.