| 159 | |
| 160 | int inside_error_route; |
| 161 | void run_error_route(struct sip_msg* msg, int init_route_stack) |
| 162 | { |
| 163 | int old_route; |
| 164 | |
| 165 | LM_DBG("triggering\n"); |
| 166 | inside_error_route = 1; |
| 167 | |
| 168 | if (init_route_stack) { |
| 169 | swap_route_type(old_route, ERROR_ROUTE); |
| 170 | |
| 171 | route_stack[0] = NULL; |
| 172 | route_stack_start = 0; |
| 173 | route_stack_size = 1; |
| 174 | |
| 175 | run_actions(sroutes->error.a, msg); |
| 176 | set_route_type(old_route); |
| 177 | } else { |
| 178 | route_params_push_level("!error_route", NULL, 0, route_param_get); |
| 179 | run_actions(sroutes->error.a, msg); |
| 180 | route_params_pop_level(); |
| 181 | } |
| 182 | |
| 183 | /* reset error info */ |
| 184 | init_err_info(); |
| 185 | inside_error_route = 0; |
| 186 | } |
| 187 | |
| 188 | |
| 189 | /* run a list of actions */ |
no test coverage detected