From c882120afd76255d6511f9b43b9776f8e0a9044f Mon Sep 17 00:00:00 2001 From: Gowa2017 <33367355+Gowa2017@users.noreply.github.com> Date: Mon, 5 Dec 2022 17:22:05 +0800 Subject: thread_index may by negative. (#1814) * thread_index may by negative. Like: 192.168.8.155:55848 --> 183.3.224.139 * reader thread index also need to uint32 --- example/ndpiSimpleIntegration.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'example/ndpiSimpleIntegration.c') diff --git a/example/ndpiSimpleIntegration.c b/example/ndpiSimpleIntegration.c index 81ac179da..49329a704 100644 --- a/example/ndpiSimpleIntegration.c +++ b/example/ndpiSimpleIntegration.c @@ -137,7 +137,7 @@ struct nDPI_workflow { struct nDPI_reader_thread { struct nDPI_workflow * workflow; pthread_t thread_id; - int array_index; + uint32_t array_index; }; static struct nDPI_reader_thread reader_threads[MAX_READER_THREADS] = {}; @@ -549,7 +549,7 @@ static void ndpi_process_packet(uint8_t * const args, uint16_t l4_len = 0; uint16_t type; - int thread_index = INITIAL_THREAD_HASH; // generated with `dd if=/dev/random bs=1024 count=1 |& hd' + uint32_t thread_index = INITIAL_THREAD_HASH; // generated with `dd if=/dev/random bs=1024 count=1 |& hd' if (reader_thread == NULL) { return; -- cgit v1.2.3