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

Function mod_init

modules/mi_xmlrpc/mi_xmlrpc_http.c:144–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144static int mod_init(void)
145{
146 http_root.len = strlen(http_root.s);
147
148 /* Load httpd api */
149 if(load_httpd_api(&httpd_api)<0) {
150 LM_ERR("Failed to load httpd api\n");
151 return -1;
152 }
153 /* Load httpd hooks */
154 httpd_api.register_httpdcb(exports.name, &http_root,
155 &mi_xmlrpc_http_answer_to_connection,
156 &mi_xmlrpc_http_flush_data,
157 HTTPD_TEXT_XML_CNT_TYPE,
158 &proc_init);
159
160 if (trace_destination_name.s) {
161 trace_destination_name.len = strlen( trace_destination_name.s);
162
163 try_load_trace_api();
164 if (mi_trace_api && mi_trace_api->get_trace_dest_by_name) {
165 t_dst = mi_trace_api->get_trace_dest_by_name(&trace_destination_name);
166 }
167
168 mi_trace_mod_id = register_mi_trace_mod();
169 }
170
171 return 0;
172}
173
174
175static void destroy(void)

Callers

nothing calls this directly

Calls 3

load_httpd_apiFunction · 0.85
try_load_trace_apiFunction · 0.85
register_mi_trace_modFunction · 0.85

Tested by

no test coverage detected