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

Function insert_tmcb

modules/tm/t_hooks.c:92–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90
91
92int insert_tmcb(struct tmcb_head_list *cb_list, int types,
93 transaction_cb f, void *param, release_tmcb_param release_func )
94{
95 struct tm_callback *cbp;
96
97 /* build a new callback structure */
98 if (!(cbp=shm_malloc( sizeof( struct tm_callback)))) {
99 LM_ERR("no more shared memory\n");
100 return E_OUT_OF_MEM;
101 }
102
103 /* link it into the proper place... */
104 cbp->next = cb_list->first;
105 cb_list->first = cbp;
106 cb_list->reg_types |= types;
107 /* ... and fill it up */
108 cbp->callback = f;
109 cbp->param = param;
110 cbp->release = release_func;
111 cbp->types = types;
112 if (cbp->next)
113 cbp->id = cbp->next->id+1;
114 else
115 cbp->id = 0;
116
117 return 1;
118}
119
120
121

Callers 2

t_uacFunction · 0.85
register_tmcbFunction · 0.85

Calls 1

shm_mallocFunction · 0.85

Tested by

no test coverage detected