* pre-init module function */
| 133 | * pre-init module function |
| 134 | */ |
| 135 | static int mod_preinit(void) |
| 136 | { |
| 137 | if (load_dlg_api(&srec_dlg) != 0) { |
| 138 | LM_ERR("dialog module not loaded! Cannot use siprec module\n"); |
| 139 | return -1; |
| 140 | } |
| 141 | |
| 142 | if (load_tm_api(&srec_tm) != 0) { |
| 143 | LM_ERR("tm module not loaded! Cannot use siprec module\n"); |
| 144 | return -1; |
| 145 | } |
| 146 | |
| 147 | if (load_b2b_api(&srec_b2b) != 0) { |
| 148 | LM_ERR("b2b_entities module not loaded! Cannot use siprec module\n"); |
| 149 | return -1; |
| 150 | } |
| 151 | |
| 152 | if (load_rtp_relay(&srec_rtp) != 0) { |
| 153 | LM_ERR("rtp_relay module not loaded! Cannot use siprec module\n"); |
| 154 | return -1; |
| 155 | } |
| 156 | |
| 157 | srec_dlg_idx = srec_dlg.dlg_ctx_register_ptr(NULL); |
| 158 | |
| 159 | if (init_srec_var() < 0) { |
| 160 | LM_ERR("cannot initialize siprec variable!\n"); |
| 161 | return -1; |
| 162 | } |
| 163 | |
| 164 | return 0; |
| 165 | } |
| 166 | |
| 167 | /** |
| 168 | * init module function |
nothing calls this directly
no test coverage detected