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

Function mod_init

modules/compression/compression.c:402–427  ·  view source on GitHub ↗

* */

Source from the content-addressed store, hash-verified

400 *
401 */
402static int mod_init(void)
403{
404 LM_INFO("Initializing module...\n");
405
406 if (build_hdr_masks()) {
407 LM_ERR("Cannot build initial mandatory headers mask\n");
408 return -1;
409 }
410
411 if (mc_level > 9 || mc_level < 1) {
412 LM_WARN("invalid level. using default 6\n");
413 mc_level = 6;
414 }
415
416 compress_ctx_pos = context_register_ptr(CONTEXT_GLOBAL, NULL);
417 LM_DBG("received compress context position %d\n", compress_ctx_pos);
418
419 compact_ctx_pos = context_register_ptr(CONTEXT_GLOBAL, NULL);
420 LM_DBG("received compact context position %d\n", compact_ctx_pos);
421
422 memset(&tm_api, 0, sizeof(struct tm_binds));
423 if (load_tm_api(&tm_api) != 0)
424 LM_DBG("TM modules was not found\n");
425
426 return 0;
427}
428
429/*
430 *

Callers

nothing calls this directly

Calls 3

build_hdr_masksFunction · 0.85
context_register_ptrFunction · 0.85
load_tm_apiFunction · 0.85

Tested by

no test coverage detected