diff options
author | Gowa2017 <33367355+Gowa2017@users.noreply.github.com> | 2022-12-05 17:22:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-05 10:22:05 +0100 |
commit | c882120afd76255d6511f9b43b9776f8e0a9044f (patch) | |
tree | 06f985e4eb8db78b6770508a47b2fd7816548016 /example/ndpiSimpleIntegration.c | |
parent | 3e4ab39b528e43db8fefdaa542a91260bd100ab2 (diff) |
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
Diffstat (limited to 'example/ndpiSimpleIntegration.c')
-rw-r--r-- | example/ndpiSimpleIntegration.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |