camins: make sure the presence flags are set.

The time stamps are calculated by sequential processing, not read from a
value in the packet record, so we don't supply them when reading
randomly.  Make sure the presence flags are 0 in that case (our callers
currently don't look at time stamps when reading randomly, because
some other file formats also don't supply time stamps for random reads,
but we should make it clean).

Change-Id: Ic035cc7d4eb36f76beefcfd98a389af09365d363
Reviewed-on: https://code.wireshark.org/review/37004
Reviewed-by: Guy Harris <gharris@sonic.net>
This commit is contained in:
Guy Harris 2020-05-01 14:19:14 -07:00 committed by Guy Harris
parent 582ad24c38
commit f0db07421f
1 changed files with 1 additions and 0 deletions

View File

@ -373,6 +373,7 @@ camins_read_packet(FILE_T fh, wtap_rec *rec, Buffer *buf,
offset += bytes_read;
rec->rec_type = REC_TYPE_PACKET;
rec->presence_flags = 0; /* we may or may not have a time stamp */
rec->rec_header.packet_header.pkt_encap = WTAP_ENCAP_DVBCI;
if (time_us) {
rec->presence_flags = WTAP_HAS_TS;