make reading of observer files work again
for some reason we have forgotten to skip the initial (always 8?) bytes prior to the start of the frame. svn path=/trunk/; revision=14822
This commit is contained in:
parent
324bed3029
commit
a60bb6ada9
|
@ -283,7 +283,7 @@ static gboolean observer_seek_read(wtap *wth, long seek_off,
|
|||
int *err, gchar **err_info)
|
||||
{
|
||||
packet_entry_header packet_header;
|
||||
|
||||
long seek_increment;
|
||||
int bytes_read;
|
||||
|
||||
if (file_seek(wth->random_fh, seek_off, SEEK_SET, err) == -1)
|
||||
|
@ -305,6 +305,16 @@ static gboolean observer_seek_read(wtap *wth, long seek_off,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* get the frame offset */
|
||||
packet_header.offset_to_frame =
|
||||
GUINT16_FROM_LE(packet_header.offset_to_frame);
|
||||
seek_increment = packet_header.offset_to_frame - sizeof(packet_header);
|
||||
if(seek_increment>0) {
|
||||
if (file_seek(wth->random_fh, seek_increment, SEEK_CUR, err) == -1)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* read in the packet */
|
||||
bytes_read = file_read(pd, 1, length, wth->random_fh);
|
||||
if (bytes_read != length) {
|
||||
|
|
Loading…
Reference in New Issue