ts: 0,
}
}
+
+ fn update_ts(&mut self, ts: u64) {
+ if ts != self.ts {
+ self.ts = ts;
+ }
+ }
+
pub fn free(&mut self) {
self.files.free();
}
let buf = unsafe{std::slice::from_raw_parts(input, input_len as usize)};
SCLogDebug!("parsing {} bytes of request data", input_len);
- state.ts = flow.get_last_time().as_secs();
+ state.update_ts(flow.get_last_time().as_secs());
state.parse_tcp_data_ts(buf)
}
SCLogDebug!("parsing {} bytes of response data", input_len);
let buf = unsafe{std::slice::from_raw_parts(input, input_len as usize)};
- state.ts = flow.get_last_time().as_secs();
+ state.update_ts(flow.get_last_time().as_secs());
state.parse_tcp_data_tc(buf)
}