diff options
author | Bernhard Schmidt <berni@debian.org> | 2020-08-15 21:29:50 +0200 |
---|---|---|
committer | Bernhard Schmidt <berni@debian.org> | 2020-08-15 21:29:50 +0200 |
commit | 1079962e4c06f88a54e50d997c1b7e84303d30b4 (patch) | |
tree | 4d019426928435425214ccedd6f89b70dbdf035d /src/openvpn/lzo.c | |
parent | 620785fe268a1221c1ba7a9cb5a70f3140a4f1ca (diff) |
New upstream version 2.5~beta1upstream/2.5_beta1
Diffstat (limited to 'src/openvpn/lzo.c')
-rw-r--r-- | src/openvpn/lzo.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/openvpn/lzo.c b/src/openvpn/lzo.c index 8d9efea..d053fed 100644 --- a/src/openvpn/lzo.c +++ b/src/openvpn/lzo.c @@ -103,9 +103,11 @@ lzo_compress_init(struct compress_context *compctx) msg(D_INIT_MEDIUM, "LZO compression initializing"); ASSERT(!(compctx->flags & COMP_F_SWAP)); compctx->wu.lzo.wmem_size = LZO_WORKSPACE; - if (lzo_init() != LZO_E_OK) + + int lzo_status = lzo_init(); + if (lzo_status != LZO_E_OK) { - msg(M_FATAL, "Cannot initialize LZO compression library"); + msg(M_FATAL, "Cannot initialize LZO compression library (lzo_init() returns %d)", lzo_status); } compctx->wu.lzo.wmem = (lzo_voidp) lzo_malloc(compctx->wu.lzo.wmem_size); check_malloc_return(compctx->wu.lzo.wmem); @@ -121,7 +123,7 @@ lzo_compress_uninit(struct compress_context *compctx) static inline bool lzo_compression_enabled(struct compress_context *compctx) { - if (compctx->flags & COMP_F_ASYM) + if (!(compctx->flags & COMP_F_ALLOW_COMPRESS)) { return false; } |