This can help pinpointing what exactly went wrong in case of
init failures (library version mismatch, memory issues, ...)
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20180713081951.31174-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg17248.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
... | ... |
@@ -103,9 +103,11 @@ lzo_compress_init(struct compress_context *compctx) |
103 | 103 |
msg(D_INIT_MEDIUM, "LZO compression initializing"); |
104 | 104 |
ASSERT(!(compctx->flags & COMP_F_SWAP)); |
105 | 105 |
compctx->wu.lzo.wmem_size = LZO_WORKSPACE; |
106 |
- if (lzo_init() != LZO_E_OK) |
|
106 |
+ |
|
107 |
+ int lzo_status = lzo_init(); |
|
108 |
+ if (lzo_status != LZO_E_OK) |
|
107 | 109 |
{ |
108 |
- msg(M_FATAL, "Cannot initialize LZO compression library"); |
|
110 |
+ msg(M_FATAL, "Cannot initialize LZO compression library (lzo_init() returns %d)", lzo_status); |
|
109 | 111 |
} |
110 | 112 |
compctx->wu.lzo.wmem = (lzo_voidp) lzo_malloc(compctx->wu.lzo.wmem_size); |
111 | 113 |
check_malloc_return(compctx->wu.lzo.wmem); |