phdr->pkt_encap and phdr->pkt_tsprec need to be set for seek-read too.
We set them to the file's values in wtap_read(), but we weren't setting them in wtap_seek_read(); set them in both places. Change-Id: Id604b1c7d27d4cee6600249e9435c49d02f8dd61 Reviewed-on: https://code.wireshark.org/review/13531 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
6bd7e928c0
commit
623e5365e5
|
@ -1458,6 +1458,19 @@ gboolean
|
||||||
wtap_seek_read(wtap *wth, gint64 seek_off,
|
wtap_seek_read(wtap *wth, gint64 seek_off,
|
||||||
struct wtap_pkthdr *phdr, Buffer *buf, int *err, gchar **err_info)
|
struct wtap_pkthdr *phdr, Buffer *buf, int *err, gchar **err_info)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* Set the packet encapsulation to the file's encapsulation
|
||||||
|
* value; if that's not WTAP_ENCAP_PER_PACKET, it's the
|
||||||
|
* right answer (and means that the read routine for this
|
||||||
|
* capture file type doesn't have to set it), and if it
|
||||||
|
* *is* WTAP_ENCAP_PER_PACKET, the caller needs to set it
|
||||||
|
* anyway.
|
||||||
|
*
|
||||||
|
* Do the same for the packet time stamp resolution.
|
||||||
|
*/
|
||||||
|
phdr->pkt_encap = wth->file_encap;
|
||||||
|
phdr->pkt_tsprec = wth->file_tsprec;
|
||||||
|
|
||||||
if (!wth->subtype_seek_read(wth, seek_off, phdr, buf, err, err_info))
|
if (!wth->subtype_seek_read(wth, seek_off, phdr, buf, err, err_info))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue