* */
| 400 | * |
| 401 | */ |
| 402 | static 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 | * |
nothing calls this directly
no test coverage detected