diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-12-21 14:01:22 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-12-21 22:01:52 +0000 |
commit | 6f61a85267013babe183fdd55eb46a06df491c47 (patch) | |
tree | 847a6876cbfaacf0ff705d4f44480806e0e8f9a9 /text2pcap.c | |
parent | a3e80157c830e75a8b7c5bae89dabd943c7bfc85 (diff) |
Don't write out statistics if we don't have any.
We don't know when the capture started or ended (the time stamps of the
first and last packets aren't necessarily the time when the capture
started or ended), we don't know how many packets were dropped in the
capture process, and we don't know how many packets were seen in various
stages before they were received by whatever software dumped them out as
text, so we have no statistics to report.
Change-Id: Ia8bface63a95f925a6ccb19c32d188055809f203
Reviewed-on: https://code.wireshark.org/review/12812
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'text2pcap.c')
-rw-r--r-- | text2pcap.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/text2pcap.c b/text2pcap.c index bf16e150c5..934709d468 100644 --- a/text2pcap.c +++ b/text2pcap.c @@ -958,34 +958,6 @@ write_file_header (void) } } -static void -write_file_trailer (void) -{ - int err; - gboolean success; - - if (use_pcapng) { - success = pcapng_write_interface_statistics_block(output_file, - 0, - &bytes_written, - "Counters provided by text2pcap", - 0, - 0, - num_packets_written, - 0, - &err); - - } else { - success = TRUE; - } - if (!success) { - fprintf(stderr, "File write error [%s] : %s\n", - output_filename, g_strerror(err)); - exit(1); - } - return; -} - /*---------------------------------------------------------------------- * Append a token to the packet preamble. */ @@ -1948,7 +1920,6 @@ main(int argc, char *argv[]) yylex(); write_current_packet(FALSE); - write_file_trailer(); fclose(input_file); fclose(output_file); if (debug) |