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

Function t_on_branch

modules/tm/t_fwd.c:74–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72int _tm_branch_index = 0;
73
74void t_on_branch( struct script_route_ref *ref )
75{
76 struct cell *t = get_t();
77 struct script_route_ref **holder;
78
79 /* in MODE_REPLY and MODE_ONFAILURE T will be set to current transaction;
80 * in MODE_REQUEST T will be set only if the transaction was already
81 * created; if not -> use the static variable */
82 holder = (!t || t==T_UNDEFINED ) ? &goto_on_branch : &t->on_branch ;
83
84 /* if something already set, free it first */
85 if (*holder)
86 shm_free( *holder );
87
88 *holder = ref ? dup_ref_script_route_in_shm( ref, 0) : NULL;
89}
90
91
92struct script_route_ref *get_on_branch(void)

Callers 2

script_initFunction · 0.85
w_t_on_branchFunction · 0.85

Calls 3

get_tFunction · 0.85
shm_freeFunction · 0.85

Tested by

no test coverage detected