BUILD: compression: fix build error with DEFAULT_MAXZLIBMEM

The tune.maxzlibmem setting was moved with commit 368780334 ("MEDIUM:
compression: move the zlib-specific stuff from global.h to compression.c")
but the preset value using DEFAULT_MAXZLIBMEM was incorrectly moved :
  - the field is in "global" and not "global.tune"
  - the trailing comma instead of semi-colon will make it either zero
    (threads enabled), break (threads enabled with debugging), or cast
    the memprintf's return pointer to int (threads disabled)

It simply proves that nobody ever used DEFAULT_MAXZLIBMEM since 1.8!

This needs to be backported to 1.8.
This commit is contained in:
Willy Tarreau 2018-11-26 10:24:45 +01:00
parent 742e0f9f1f
commit 3bfcd10218

View File

@ -717,7 +717,7 @@ static void __comp_fetch_init(void)
slz_prepare_dist_table();
#endif
#if defined(USE_ZLIB) && defined(DEFAULT_MAXZLIBMEM)
global.tune.maxzlibmem = DEFAULT_MAXZLIBMEM * 1024U * 1024U,
global.maxzlibmem = DEFAULT_MAXZLIBMEM * 1024U * 1024U;
#endif
#ifdef USE_ZLIB
HA_SPIN_INIT(&comp_pool_lock);