summaryrefslogtreecommitdiff
path: root/src/openvpn/lzo.c
diff options
context:
space:
mode:
authorBernhard Schmidt <berni@debian.org>2020-08-15 21:29:54 +0200
committerBernhard Schmidt <berni@debian.org>2020-08-15 21:29:54 +0200
commit7c229d538824cb679351220ad8911f7b2daa7c23 (patch)
tree5c4d64b60da9018c7db3a9335a9787d326beade3 /src/openvpn/lzo.c
parentd3986a312f5fbcfd0e78e6b147eef419fb4e5f54 (diff)
parent1079962e4c06f88a54e50d997c1b7e84303d30b4 (diff)
Update upstream source from tag 'upstream/2.5_beta1'
Update to upstream version '2.5~beta1' with Debian dir d53f9a482ac24eb491a294b26c24bb1d87afad24
Diffstat (limited to 'src/openvpn/lzo.c')
-rw-r--r--src/openvpn/lzo.c8
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;
}