Skip to content

Commit

Permalink
tracer: always load the trace api
Browse files Browse the repository at this point in the history
(cherry picked from commit 7791304)
  • Loading branch information
razvancrainea committed May 1, 2019
1 parent 3ff6d04 commit 93c3942
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions modules/tracer/tracer.c
Expand Up @@ -836,23 +836,16 @@ static int mod_init(void)

*trace_on_flag = trace_on;

if (trace_prot_bind(TRACE_PROTO, &tprot)) {
LM_ERR("Failed to bind tracing protocol!\n");
return -1;
}

/* initialize hep api */
for (it=trace_list;it;it=it->next) {
if (it->type!=TYPE_HEP)
continue;

if (tprot.get_trace_dest_by_name == NULL) {
LM_DBG("Loading tracing protocol!\n");
/*
* if more tracing protocols shall implement the api then
* this should be a modparam
*/
if (trace_prot_bind(TRACE_PROTO, &tprot)) {
LM_ERR("Failed to bind tracing protocol!\n");
return -1;
}
}

it->el.hep.hep_id = tprot.get_trace_dest_by_name(&it->el.hep.name);
if (it->el.hep.hep_id == NULL) {
LM_ERR("hep id not found!\n");
Expand Down

0 comments on commit 93c3942

Please sign in to comment.