diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-10 12:27:47 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-10 12:28:08 +0000 |
commit | e80ac859a73deaf75da180e2446d62134b7f36ab (patch) | |
tree | cb1e8e1ff3cd54cbf23b123188c982d8e2cc5a29 /src/libmime/images.c | |
parent | a32d867f9f22bd5da802e1d808d67a1b99aac075 (diff) | |
download | rspamd-e80ac859a73deaf75da180e2446d62134b7f36ab.tar.gz rspamd-e80ac859a73deaf75da180e2446d62134b7f36ab.zip |
[Minor] Allow to configure images DCT cache size
Diffstat (limited to 'src/libmime/images.c')
-rw-r--r-- | src/libmime/images.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libmime/images.c b/src/libmime/images.c index d6cd602a9..72f585a14 100644 --- a/src/libmime/images.c +++ b/src/libmime/images.c @@ -25,7 +25,6 @@ #include <math.h> #define RSPAMD_NORMALIZED_DIM 64 -#define RSPAMD_IMAGES_CACHE_SIZE 256 static rspamd_lru_hash_t *images_hash = NULL; #endif @@ -372,7 +371,7 @@ rspamd_image_dct_equal (gconstpointer a, gconstpointer b) static void rspamd_image_create_cache (struct rspamd_config *cfg) { - images_hash = rspamd_lru_hash_new_full (RSPAMD_IMAGES_CACHE_SIZE, NULL, + images_hash = rspamd_lru_hash_new_full (cfg->images_cache_size, NULL, rspamd_image_cache_entry_dtor, rspamd_image_dct_hash, rspamd_image_dct_equal); } |