Sizes of LRU caches are now configurable
0 as size value disable the cache. The diffs in unit tests are due to the fact that some lookups are performed before the first insert: before this change these lookups weren't counted because the cache was not yet initialized, now they are.
This commit is contained in:
@@ -118,9 +118,6 @@ static void ndpi_add_connection_as_bittorrent(struct ndpi_detection_module_struc
|
||||
flow->extra_packets_func = search_bittorrent_again;
|
||||
}
|
||||
|
||||
if(ndpi_struct->bittorrent_cache == NULL)
|
||||
ndpi_struct->bittorrent_cache = ndpi_lru_cache_init(32768);
|
||||
|
||||
if(ndpi_struct->bittorrent_cache && packet->iph) {
|
||||
u_int32_t key1, key2, i;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user