+ if (knet_h->compress_max_model > KNET_MAX_COMPRESS_METHODS) {
+ log_err(knet_h, KNET_SUB_COMPRESS, "Too many compress methods supported by compress.c. Please complain to knet developers to fix internals.h KNET_MAX_COMPRESS_METHODS define!");
+ errno = EINVAL;
+ return -1;
+ }
if (!knet_handle_compress_cfg) {
+ while (compress_modules_cmds[idx].model_name != NULL) {
+ if (compress_modules_cmds[idx].init != NULL) {
+ if (compress_modules_cmds[idx].init(knet_h, idx) < 0) {
+ log_err(knet_h, KNET_SUB_COMPRESS, "Failed to initialize %s library", compress_modules_cmds[idx].model_name);