summaryrefslogtreecommitdiff
path: root/tethereal.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-10-19 22:43:52 +0000
committerGuy Harris <guy@alum.mit.edu>2004-10-19 22:43:52 +0000
commit6aaf94879521bf4bd4d5de235ce2568adfe76058 (patch)
tree346534e2f20ac63e933f12a7c1d22c49d9222934 /tethereal.c
parent60bbdd93a7c4036248e1ebc9545a096ab00b3373 (diff)
downloadwireshark-6aaf94879521bf4bd4d5de235ce2568adfe76058.tar.gz
If we're not printing packet information, don't print the preamble or
finale for that information, either. svn path=/trunk/; revision=12352
Diffstat (limited to 'tethereal.c')
-rw-r--r--tethereal.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/tethereal.c b/tethereal.c
index 045a23ff72..7e43d42e45 100644
--- a/tethereal.c
+++ b/tethereal.c
@@ -2364,10 +2364,12 @@ load_cap_file(capture_file *cf, int out_file_type)
goto out;
}
} else {
- if (!write_preamble(cf)) {
- err = errno;
- show_print_file_io_error(err);
- goto out;
+ if (print_packet_info) {
+ if (!write_preamble(cf)) {
+ err = errno;
+ show_print_file_io_error(err);
+ goto out;
+ }
}
pdh = NULL;
}
@@ -2426,9 +2428,11 @@ load_cap_file(capture_file *cf, int out_file_type)
if (!wtap_dump_close(pdh, &err))
show_capture_file_io_error(cfile.save_file, err, TRUE);
} else {
- if (!write_finale()) {
- err = errno;
- show_print_file_io_error(err);
+ if (print_packet_info) {
+ if (!write_finale()) {
+ err = errno;
+ show_print_file_io_error(err);
+ }
}
}
}