Skip to content

Commit

Permalink
core: invoke KEMI ksr_onsend_route()
Browse files Browse the repository at this point in the history
This will invoke ksr_onsend_route() unconditionally in the cfgengine.

(cherry picked from commit 4494b60)
(cherry picked from commit 6275646)
  • Loading branch information
aalba6675 authored and miconda committed Jun 20, 2018
1 parent ae57faa commit 8c756ac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/onsend.h
Expand Up @@ -70,7 +70,9 @@ static inline int run_onsend(sip_msg_t* orig_msg, dest_info_t* dst,
return 1;
}
ret=1;
if (onsend_rt.rlist[DEFAULT_RT]){
// do if onsend_route{} or cfgengine exists
keng = sr_kemi_eng_get();
if (onsend_rt.rlist[DEFAULT_RT] || keng){
onsnd_info.to=&dst->to;
onsnd_info.send_sock=dst->send_sock;
onsnd_info.buf=buf;
Expand All @@ -86,8 +88,7 @@ static inline int run_onsend(sip_msg_t* orig_msg, dest_info_t* dst,
orig_msg->fwd_send_flags=dst->send_flags; /* intial value */
init_run_actions_ctx(&ra_ctx);

keng = sr_kemi_eng_get();
if(unlikely(keng!=NULL)) {
if(keng) {
bctx = sr_kemi_act_ctx_get();
sr_kemi_act_ctx_set(&ra_ctx);
ret=keng->froute(orig_msg, ONSEND_ROUTE, NULL, NULL);
Expand Down

0 comments on commit 8c756ac

Please sign in to comment.