| 90 | }; |
| 91 | |
| 92 | int init_black_lists(void) |
| 93 | { |
| 94 | bl_ctx_idx = context_register_int(CONTEXT_GLOBAL, NULL); |
| 95 | if (bl_ctx_idx < 0) |
| 96 | return -1; |
| 97 | |
| 98 | /* register timer routine */ |
| 99 | if (register_timer("blcore-expire", delete_expired_routine, 0, 1, |
| 100 | TIMER_FLAG_SKIP_ON_DELAY) < 0) { |
| 101 | LM_ERR("failed to register timer\n"); |
| 102 | return -1; |
| 103 | } |
| 104 | |
| 105 | /* register MI commands */ |
| 106 | if (register_mi_mod("blacklists", mi_bl_cmds) < 0) { |
| 107 | LM_ERR("unable to register MI cmds\n"); |
| 108 | return -1; |
| 109 | } |
| 110 | |
| 111 | return 0; |
| 112 | } |
| 113 | |
| 114 | /* |
| 115 | * get_bl_marker() and store_bl_marker(): |
nothing calls this directly
no test coverage detected