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

Function run_actions

action.c:116–151  ·  view source on GitHub ↗

run actions from a route */ returns: 0, or 1 on success, <0 on error */ (0 if drop or break encountered, 1 if not ) */

Source from the content-addressed store, hash-verified

114/* returns: 0, or 1 on success, <0 on error */
115/* (0 if drop or break encountered, 1 if not ) */
116static inline int run_actions(struct action* a, struct sip_msg* msg)
117{
118 int ret, _, ret_lvl;
119 str top_route;
120
121 if (route_stack_size > ROUTE_MAX_REC_LEV) {
122 get_top_route_type(&top_route, &_);
123 LM_ERR("route recursion limit reached, giving up! (nested routes: %d, "
124 "first: '%.*s', last: '%s')!\n", route_stack_size,
125 top_route.len, top_route.s, route_stack[ROUTE_MAX_REC_LEV]);
126 ret=E_UNSPEC;
127 goto error;
128 }
129
130 if (a==0){
131 LM_WARN("null action list (route stack size: %d)\n",
132 route_stack_size);
133 ret=1;
134 goto error;
135 }
136
137 ret_lvl=script_return_push();
138
139 ret=run_action_list(a, msg);
140
141 /* if 'return', reset the flag */
142 if(action_flags&ACT_FL_RETURN)
143 action_flags &= ~ACT_FL_RETURN;
144
145 script_return_pop(ret_lvl);
146
147 return ret;
148
149error:
150 return ret;
151}
152
153
154int _run_actions(struct action *a, struct sip_msg *msg)

Callers 4

_run_actionsFunction · 0.85
run_error_routeFunction · 0.85
run_top_routeFunction · 0.85
do_actionFunction · 0.85

Calls 4

get_top_route_typeFunction · 0.85
script_return_pushFunction · 0.85
run_action_listFunction · 0.85
script_return_popFunction · 0.85

Tested by

no test coverage detected