diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-04-04 18:56:27 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-04-05 02:49:43 +0000 |
commit | 8a5b26efb14b7f8f5375383436f03108d52d9aed (patch) | |
tree | eb57791fc53deab1c618b259e11092f122a8ee97 /plugins/wiretap | |
parent | b572b65e518937f43b630991c07369d8e0c79f53 (diff) |
Have wtap_read() fill in a wtap_rec and Buffer.
That makes it - and the routines that implement it - work more like the
seek-read routine.
Change-Id: I0cace2d0e4c9ebfc21ac98fd1af1ec70f60a240d
Reviewed-on: https://code.wireshark.org/review/32727
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'plugins/wiretap')
-rw-r--r-- | plugins/wiretap/usbdump/usbdump.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/wiretap/usbdump/usbdump.c b/plugins/wiretap/usbdump/usbdump.c index 2730602466..402667f3b1 100644 --- a/plugins/wiretap/usbdump/usbdump.c +++ b/plugins/wiretap/usbdump/usbdump.c @@ -63,7 +63,8 @@ typedef struct { } usbdump_info_t; -static gboolean usbdump_read(wtap *wth, int *err, gchar **err_info, +static gboolean usbdump_read(wtap *wth, wtap_rec *rec, Buffer *buf, + int *err, gchar **err_info, gint64 *data_offset); static gboolean usbdump_seek_read(wtap *wth, gint64 seek_off, wtap_rec *rec, Buffer *buf, @@ -159,7 +160,8 @@ usbdump_open(wtap *wth, int *err, char **err_info) * support subsequent random access read. */ static gboolean -usbdump_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset) +usbdump_read(wtap *wth, wtap_rec *rec, Buffer *buf, int *err, gchar **err_info, + gint64 *data_offset) { usbdump_info_t *usbdump_info = (usbdump_info_t *)wth->priv; @@ -167,8 +169,7 @@ usbdump_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset) *data_offset = file_tell(wth->fh); /* Try to read a packet worth of data */ - if (!usbdump_read_packet(wth, wth->fh, &wth->rec, wth->rec_data, - err, err_info)) + if (!usbdump_read_packet(wth, wth->fh, rec, buf, err, err_info)) return FALSE; /* Check if we overrun the multiframe during the last read */ |