Skip to content

Commit

Permalink
Merge branch 'script_reload'
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan-iancu committed Apr 15, 2019
2 parents 9af63ec + d13f3eb commit 5867fe0
Show file tree
Hide file tree
Showing 201 changed files with 3,603 additions and 2,479 deletions.
11 changes: 6 additions & 5 deletions action.c
Expand Up @@ -160,7 +160,7 @@ void run_error_route(struct sip_msg* msg, int force_reset)
int old_route;
LM_DBG("triggering\n");
swap_route_type(old_route, ERROR_ROUTE);
run_actions(error_rlist.a, msg);
run_actions(sroutes->error.a, msg);
/* reset error info */
init_err_info();
set_route_type(old_route);
Expand All @@ -179,7 +179,7 @@ int run_action_list(struct action* a, struct sip_msg* msg)
action_flags |= ACT_FL_EXIT;

/* check for errors */
if (_oser_err_info.eclass!=0 && error_rlist.a!=NULL &&
if (_oser_err_info.eclass!=0 && sroutes->error.a!=NULL &&
(route_type&(ERROR_ROUTE|ONREPLY_ROUTE|LOCAL_ROUTE))==0 )
run_error_route(msg,0);

Expand Down Expand Up @@ -831,7 +831,8 @@ int do_action(struct action* a, struct sip_msg* msg)
ret=1;
break;
case ROUTE_T:
script_trace("route", rlist[a->elem[0].u.number].name, msg, a->file, a->line) ;
script_trace("route", sroutes->request[a->elem[0].u.number].name,
msg, a->file, a->line) ;
if (a->elem[0].type!=NUMBER_ST){
LM_ALERT("BUG in route() type %d\n",
a->elem[0].type);
Expand All @@ -854,11 +855,11 @@ int do_action(struct action* a, struct sip_msg* msg)
}
route_params_push_level(a->elem[2].u.data,
(void*)(unsigned long)a->elem[1].u.number, route_param_get);
return_code=run_actions(rlist[a->elem[0].u.number].a, msg);
return_code=run_actions(sroutes->request[a->elem[0].u.number].a, msg);
route_params_pop_level();
} else {
route_params_push_level(NULL, 0, route_param_get);
return_code=run_actions(rlist[a->elem[0].u.number].a, msg);
return_code=run_actions(sroutes->request[a->elem[0].u.number].a, msg);
route_params_pop_level();
}
ret=return_code;
Expand Down
4 changes: 2 additions & 2 deletions async.c
Expand Up @@ -230,7 +230,7 @@ int async_launch_resume(int fd, void *param)
if (ctx->report_route!=-1) {
LM_DBG("runinng report route for a launch job\n");
set_route_type( REQUEST_ROUTE );
run_top_route( rlist[ctx->report_route].a, &req);
run_top_route( sroutes->request[ctx->report_route].a, &req);

/* remove all added AVP */
reset_avps( );
Expand Down Expand Up @@ -336,7 +336,7 @@ int async_script_launch(struct sip_msg *msg, struct action* a,
/* run the report route inline */
init_dummy_request( req );
set_route_type( REQUEST_ROUTE );
run_top_route( rlist[report_route].a, &req);
run_top_route( sroutes->request[report_route].a, &req);
/* remove all added AVP */
reset_avps( );
return 1;
Expand Down

0 comments on commit 5867fe0

Please sign in to comment.