pcapng: Sysidg events don't always have timestamps
This commit is contained in:
parent
a0f5d63515
commit
04bd21b700
|
@ -3192,7 +3192,7 @@ pcapng_read_sysdig_event_block(wtap *wth, FILE_T fh, pcapng_block_header_t *bh,
|
|||
|
||||
wblock->rec->rec_type = REC_TYPE_SYSCALL;
|
||||
wblock->rec->rec_header.syscall_header.record_type = bh->block_type;
|
||||
wblock->rec->presence_flags = WTAP_HAS_TS|WTAP_HAS_CAP_LEN /*|WTAP_HAS_INTERFACE_ID */;
|
||||
wblock->rec->presence_flags = WTAP_HAS_CAP_LEN /*|WTAP_HAS_INTERFACE_ID */;
|
||||
wblock->rec->tsprec = WTAP_TSPREC_NSEC;
|
||||
|
||||
if (!wtap_read_bytes(fh, &cpu_id, sizeof cpu_id, err, err_info)) {
|
||||
|
@ -3248,6 +3248,10 @@ pcapng_read_sysdig_event_block(wtap *wth, FILE_T fh, pcapng_block_header_t *bh,
|
|||
wblock->rec->rec_header.syscall_header.nparams = nparams;
|
||||
}
|
||||
|
||||
if (ts) {
|
||||
wblock->rec->presence_flags |= WTAP_HAS_TS;
|
||||
}
|
||||
|
||||
wblock->rec->ts.secs = (time_t) (ts / 1000000000);
|
||||
wblock->rec->ts.nsecs = (int) (ts % 1000000000);
|
||||
|
||||
|
|
Loading…
Reference in New Issue