diff options
author | Nardi Ivan <nardi.ivan@gmail.com> | 2022-09-22 17:42:46 +0200 |
---|---|---|
committer | Toni <matzeton@googlemail.com> | 2022-09-23 18:33:48 +0200 |
commit | 1f345b311f7f4bb3246a649ced3cec11d742b6e4 (patch) | |
tree | af829d9cfa5840f44d7207c2554107f65de55f47 /src/lib/protocols/bittorrent.c | |
parent | 83de3e4716eb7dcc373f0fcad4b59e83ea140fb1 (diff) |
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.
Diffstat (limited to 'src/lib/protocols/bittorrent.c')
-rw-r--r-- | src/lib/protocols/bittorrent.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/lib/protocols/bittorrent.c b/src/lib/protocols/bittorrent.c index c28c8bcd4..cac66b6be 100644 --- a/src/lib/protocols/bittorrent.c +++ b/src/lib/protocols/bittorrent.c @@ -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; |