aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/hcidump.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-02-18 18:33:53 -0800
committerGuy Harris <guy@alum.mit.edu>2016-02-19 02:34:50 +0000
commit1e8905ca8e1db9231bc5381887850aa3eca7f735 (patch)
treeb445b379bc601311a64d4453bfc54be10e05aad9 /wiretap/hcidump.c
parent7a5c04e243ff13b43618f8385f52c2186f753870 (diff)
Don't bother setting phdr->pkt_encap to wth->file_encap.
wtap_read() and wtap_seek_read() now do so before calling the read or seek-read routine, so there's no need to do so in those routines. Rename hcidump_process_packet() to hcidump_read_packet() while we're at it, as it doesn't just process an already-read packet, it does the reading as well as the processing. Change-Id: Ic13da6a2096e68550d80f2eff31f03d0edb58147 Reviewed-on: https://code.wireshark.org/review/13998 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/hcidump.c')
-rw-r--r--wiretap/hcidump.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/wiretap/hcidump.c b/wiretap/hcidump.c
index 760456ed05..3e7ee66272 100644
--- a/wiretap/hcidump.c
+++ b/wiretap/hcidump.c
@@ -33,7 +33,7 @@ struct dump_hdr {
#define DUMP_HDR_SIZE (sizeof(struct dump_hdr))
-static gboolean hcidump_process_packet(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr,
+static gboolean hcidump_read_packet(FILE_T fh, struct wtap_pkthdr *phdr,
Buffer *buf, int *err, gchar **err_info)
{
struct dump_hdr dh;
@@ -55,7 +55,6 @@ static gboolean hcidump_process_packet(wtap *wth, FILE_T fh, struct wtap_pkthdr
}
phdr->rec_type = REC_TYPE_PACKET;
- phdr->pkt_encap = wth->file_encap;
phdr->presence_flags = WTAP_HAS_TS;
phdr->ts.secs = GUINT32_FROM_LE(dh.ts_sec);
phdr->ts.nsecs = GUINT32_FROM_LE(dh.ts_usec) * 1000;
@@ -72,7 +71,7 @@ static gboolean hcidump_read(wtap *wth, int *err, gchar **err_info,
{
*data_offset = file_tell(wth->fh);
- return hcidump_process_packet(wth, wth->fh, &wth->phdr, wth->frame_buffer,
+ return hcidump_read_packet(wth->fh, &wth->phdr, wth->frame_buffer,
err, err_info);
}
@@ -82,7 +81,7 @@ static gboolean hcidump_seek_read(wtap *wth, gint64 seek_off,
if (file_seek(wth->random_fh, seek_off, SEEK_SET, err) == -1)
return FALSE;
- return hcidump_process_packet(wth, wth->random_fh, phdr, buf, err, err_info);
+ return hcidump_read_packet(wth->random_fh, phdr, buf, err, err_info);
}
wtap_open_return_val hcidump_open(wtap *wth, int *err, gchar **err_info)