aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2020-01-05 18:24:58 +0100
committerLuca Deri <deri@ntop.org>2020-01-05 18:24:58 +0100
commit29dd45838da84bfa43da615d7624373392861751 (patch)
treeb7073bac0160f81005d8afc26dd1cd29d8a4beed /example
parent23421b47d998c6fc4f90070c34c0693362d95bed (diff)
Updated (C)
Diffstat (limited to 'example')
-rw-r--r--example/ndpiReader.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index 6a52cc953..40219acd4 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -2872,7 +2872,8 @@ static void ndpi_process_packet(u_char *args,
*/
static void runPcapLoop(u_int16_t thread_id) {
if((!shutdown_app) && (ndpi_thread_info[thread_id].workflow->pcap_handle != NULL))
- pcap_loop(ndpi_thread_info[thread_id].workflow->pcap_handle, -1, &ndpi_process_packet, (u_char*)&thread_id);
+ if(pcap_loop(ndpi_thread_info[thread_id].workflow->pcap_handle, -1, &ndpi_process_packet, (u_char*)&thread_id) < 0)
+ printf("Error while reading pcap file: '%s'\n", pcap_geterr(ndpi_thread_info[thread_id].workflow->pcap_handle));
}
/**