From c9f32ee76dbc5e323d321b088562df980d2f525f Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 3 Nov 2017 17:15:04 +0100 Subject: Fixed begin/end type when capturing live traffic --- example/ndpiReader.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'example/ndpiReader.c') diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 710839261..40153e168 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -2301,11 +2301,8 @@ static void pcap_process_packet(u_char *args, return; } - /* Check if capture is live or not */ - if(!live_capture) { - if(!pcap_start.tv_sec) pcap_start.tv_sec = header->ts.tv_sec, pcap_start.tv_usec = header->ts.tv_usec; - pcap_end.tv_sec = header->ts.tv_sec, pcap_end.tv_usec = header->ts.tv_usec; - } + if(!pcap_start.tv_sec) pcap_start.tv_sec = header->ts.tv_sec, pcap_start.tv_usec = header->ts.tv_usec; + pcap_end.tv_sec = header->ts.tv_sec, pcap_end.tv_usec = header->ts.tv_usec; /* Idle flows cleanup */ if(live_capture) { -- cgit v1.2.3