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

Function trace_prot_bind

trace_api.c:35–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33trace_proto_t* global_trace_api=NULL;
34
35int trace_prot_bind(char* module_name, trace_proto_t* prot)
36{
37 trace_bind_api_f bind_f;
38
39 if (!module_name || !prot) {
40 LM_ERR("null argument\n");
41 return -1;
42 }
43
44 bind_f = (trace_bind_api_f) find_mod_export(module_name,
45 "trace_bind_api", 0);
46
47 if (bind_f) {
48 LM_DBG("using trace bind api for %s\n", module_name);
49
50 if (bind_f(prot)) {
51 LM_ERR("failed to bind proto for module %s\n", module_name);
52 return -1;
53 }
54 } else {
55 LM_DBG("<%s> has no bind api function\n", module_name);
56 return -1;
57 }
58
59 return 0;
60}

Callers 10

init_xlogFunction · 0.85
try_load_trace_apiFunction · 0.85
mod_initFunction · 0.85
mod_initFunction · 0.85
mod_initFunction · 0.85
mod_initFunction · 0.85
mod_initFunction · 0.85
rcl_init_internalsFunction · 0.85
mod_initFunction · 0.85
mod_initFunction · 0.85

Calls 1

find_mod_exportFunction · 0.85

Tested by

no test coverage detected