| 159 | |
| 160 | |
| 161 | void t_on_reply( struct script_route_ref *ref ) |
| 162 | { |
| 163 | struct cell *t = get_t(); |
| 164 | |
| 165 | struct script_route_ref **holder; |
| 166 | |
| 167 | /* in MODE_REPLY and MODE_ONFAILURE T will be set to current transaction; |
| 168 | * in MODE_REQUEST T will be set only if the transaction was already |
| 169 | * created; if not -> use the static variable */ |
| 170 | holder = (!t || t==T_UNDEFINED ) ? &goto_on_reply : |
| 171 | ( route_type==BRANCH_ROUTE ? |
| 172 | &TM_BRANCH(t,_tm_branch_index).on_reply : &t->on_reply ); |
| 173 | |
| 174 | /* if something already set, free it first */ |
| 175 | if (*holder) |
| 176 | shm_free( *holder ); |
| 177 | |
| 178 | *holder = ref ? dup_ref_script_route_in_shm( ref, 0) : NULL; |
| 179 | } |
| 180 | |
| 181 | |
| 182 | struct script_route_ref *get_on_negative(void) |
no test coverage detected