From 1f345b311f7f4bb3246a649ced3cec11d742b6e4 Mon Sep 17 00:00:00 2001 From: Nardi Ivan Date: Thu, 22 Sep 2022 17:42:46 +0200 Subject: 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. --- src/lib/protocols/hangout.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/lib/protocols/hangout.c') diff --git a/src/lib/protocols/hangout.c b/src/lib/protocols/hangout.c index 7f5414ef0..c8ae84177 100644 --- a/src/lib/protocols/hangout.c +++ b/src/lib/protocols/hangout.c @@ -98,8 +98,6 @@ void ndpi_search_hangout(struct ndpi_detection_module_struct *ndpi_struct, NDPI_LOG_INFO(ndpi_struct, "found Hangout\n"); /* Hangout is over STUN hence the LRU cache is shared */ - if(ndpi_struct->stun_cache == NULL) - ndpi_struct->stun_cache = ndpi_lru_cache_init(1024); if(ndpi_struct->stun_cache && packet->iph) { u_int32_t key = get_stun_lru_key(flow, !matched_src); -- cgit v1.2.3