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

Function mod_preinit

modules/siprec/siprec.c:135–165  ·  view source on GitHub ↗

* pre-init module function */

Source from the content-addressed store, hash-verified

133 * pre-init module function
134 */
135static 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

Callers

nothing calls this directly

Calls 5

load_dlg_apiFunction · 0.85
load_tm_apiFunction · 0.85
load_b2b_apiFunction · 0.85
load_rtp_relayFunction · 0.85
init_srec_varFunction · 0.85

Tested by

no test coverage detected