MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / check_zlib_rc

Function check_zlib_rc

modules/compression/compression_helpers.c:351–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351int check_zlib_rc(int rc)
352{
353 switch (rc) {
354 case Z_OK:
355 LM_DBG("compression successful\n");
356 return 0;
357 case Z_MEM_ERROR:
358 LM_ERR("not enough memory in compressed buffer\n");
359 return -1;
360 case Z_BUF_ERROR:
361 LM_ERR("not enough room in output buffer\n");
362 return -1;
363 case Z_STREAM_ERROR:
364 LM_ERR("invalid compression level\n");
365 return -1;
366 case Z_DATA_ERROR:
367 LM_ERR("input data incomplete or corrupted\n");
368 return -1;
369 default:
370 LM_ERR("invalid return code from zlib\n");
371 return -1;
372 }
373}
374
375int wrap_realloc(str* buf, int new_len)
376{

Callers 2

mc_compress_cbFunction · 0.85
mc_decompressFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected