| 72 | int _tm_branch_index = 0; |
| 73 | |
| 74 | void 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 | |
| 92 | struct script_route_ref *get_on_branch(void) |
no test coverage detected