mirror of
https://github.com/ntop/n2n.git
synced 2024-09-20 00:51:10 +02:00
Merge pull request #285 from Logan007/fixLzoError
call lzo_init() only if required
This commit is contained in:
commit
ff689f9b72
|
@ -233,10 +233,11 @@ n2n_edge_t* edge_init(const tuntap_dev *dev, const n2n_edge_conf_t *conf, int *r
|
||||||
eee->pending_peers = NULL;
|
eee->pending_peers = NULL;
|
||||||
eee->sup_attempts = N2N_EDGE_SUP_ATTEMPTS;
|
eee->sup_attempts = N2N_EDGE_SUP_ATTEMPTS;
|
||||||
|
|
||||||
if(lzo_init() != LZO_E_OK) {
|
if(eee->conf.compression == N2N_COMPRESSION_ID_LZO)
|
||||||
traceEvent(TRACE_ERROR, "LZO compression error");
|
if(lzo_init() != LZO_E_OK) {
|
||||||
goto edge_init_error;
|
traceEvent(TRACE_ERROR, "LZO compression error");
|
||||||
}
|
goto edge_init_error;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef N2N_HAVE_ZSTD
|
#ifdef N2N_HAVE_ZSTD
|
||||||
// zstd does not require initialization. if it were required, this would be a good place
|
// zstd does not require initialization. if it were required, this would be a good place
|
||||||
|
|
Loading…
Reference in New Issue
Block a user