mirror of
https://github.com/ntop/n2n.git
synced 2024-09-20 00:51:10 +02:00
made compression scheme name accessible even if not compiled
This commit is contained in:
parent
43090bdcb4
commit
07b675bae6
|
@ -215,7 +215,9 @@ static void setPayloadCompression(n2n_edge_conf_t *conf, int compression) {
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
conf->compression = N2N_COMPRESSION_ID_NONE;
|
conf->compression = N2N_COMPRESSION_ID_NONE;
|
||||||
traceEvent(TRACE_NORMAL, "the %s compression given by -z_ option is not supported in this version.", compression_str(compression));
|
// internal comrpession scheme numbering differs from cli counting by one, hence plus one
|
||||||
|
// (internal: 0 == invalid, 1 == none, 2 == lzo, 3 == zstd)
|
||||||
|
traceEvent(TRACE_NORMAL, "the %s compression given by -z_ option is not supported in this version.", compression_str(compression + 1));
|
||||||
exit(1); // to make the user aware
|
exit(1); // to make the user aware
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,10 +115,7 @@ const char* compression_str(uint8_t cmpr) {
|
||||||
switch(cmpr) {
|
switch(cmpr) {
|
||||||
case N2N_COMPRESSION_ID_NONE: return("none");
|
case N2N_COMPRESSION_ID_NONE: return("none");
|
||||||
case N2N_COMPRESSION_ID_LZO: return("lzo1x");
|
case N2N_COMPRESSION_ID_LZO: return("lzo1x");
|
||||||
|
|
||||||
#ifdef HAVE_LIBZSTD
|
|
||||||
case N2N_COMPRESSION_ID_ZSTD: return("zstd");
|
case N2N_COMPRESSION_ID_ZSTD: return("zstd");
|
||||||
#endif
|
|
||||||
default: return("invalid");
|
default: return("invalid");
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user