BUG/MINOR: compression: dynamic level increase

Using compression rate limit, the compression level wasn't taking care
of the max compression level during a session because the test was done
on the wrong variable.
This commit is contained in:
William Lallemand 2012-11-20 17:11:13 +01:00 committed by Willy Tarreau
parent e3a7d99062
commit c71407657d

View File

@ -570,7 +570,7 @@ int deflate_flush(struct comp_ctx *comp_ctx, struct buffer *out, int flag)
deflateParams(&comp_ctx->strm, comp_ctx->cur_lvl, Z_DEFAULT_STRATEGY); deflateParams(&comp_ctx->strm, comp_ctx->cur_lvl, Z_DEFAULT_STRATEGY);
} }
} else if (comp_ctx->cur_lvl < global.comp_rate_lim) { } else if (comp_ctx->cur_lvl < global.tune.comp_maxlevel) {
/* increase level */ /* increase level */
comp_ctx->cur_lvl++ ; comp_ctx->cur_lvl++ ;
deflateParams(&comp_ctx->strm, comp_ctx->cur_lvl, Z_DEFAULT_STRATEGY); deflateParams(&comp_ctx->strm, comp_ctx->cur_lvl, Z_DEFAULT_STRATEGY);