aboutsummaryrefslogtreecommitdiffstats
path: root/tethereal.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-08-13 08:27:58 +0000
committerGuy Harris <guy@alum.mit.edu>2004-08-13 08:27:58 +0000
commit10d4e3873abcd3eda2a8be8e8eb71d5471d4aed6 (patch)
tree75388cbcfa0597121c35c3b21b926846478d0772 /tethereal.c
parent2875ddd2692404005c9847f27e19fe1f5a92ae07 (diff)
downloadwireshark-10d4e3873abcd3eda2a8be8e8eb71d5471d4aed6.tar.gz
wireshark-10d4e3873abcd3eda2a8be8e8eb71d5471d4aed6.tar.bz2
wireshark-10d4e3873abcd3eda2a8be8e8eb71d5471d4aed6.zip
When opening an output file, use "file_snaplen" as the snapshot length,
rather than "pcap_snapshot(ld.pch)" - we've set "file_snaplen" to "pcap_snapshot(ld.pch)" if we're capturing from a device, but if we're reading from a pipe, "ld.pch" is null (so we'll crash if we use it), and we've set "file_snaplen" from the header we've read from a pipe. svn path=/trunk/; revision=11734
Diffstat (limited to 'tethereal.c')
-rw-r--r--tethereal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tethereal.c b/tethereal.c
index f2b5db166b..97aa49f1e7 100644
--- a/tethereal.c
+++ b/tethereal.c
@@ -1892,14 +1892,14 @@ capture(int out_file_type)
capture_opts.ringbuffer_num_files);
if (cfile.save_file_fd != -1) {
ld.pdh = ringbuf_init_wtap_dump_fdopen(out_file_type, ld.linktype,
- pcap_snapshot(ld.pch), &err);
+ file_snaplen, &err);
} else {
err = errno; /* "ringbuf_init()" failed */
ld.pdh = NULL;
}
} else {
ld.pdh = wtap_dump_open(cfile.save_file, out_file_type,
- ld.linktype, pcap_snapshot(ld.pch), &err);
+ ld.linktype, file_snaplen, &err);
}
if (ld.pdh == NULL) {