[sr-dev] git:master:19968a46: tm: init actions context for kemi execution

Daniel-Constantin Mierla miconda at gmail.com
Thu Apr 14 18:48:10 CEST 2016


Module: kamailio
Branch: master
Commit: 19968a464cbb668d9bef6c866f12eecb530ddb05
URL: https://github.com/kamailio/kamailio/commit/19968a464cbb668d9bef6c866f12eecb530ddb05

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-04-14T18:16:32+02:00

tm: init actions context for kemi execution

- needed to catch drop in onreply/branch route callbacks

---

Modified: modules/tm/t_funcs.c
Modified: modules/tm/t_fwd.c
Modified: modules/tm/t_reply.c

---

Diff:  https://github.com/kamailio/kamailio/commit/19968a464cbb668d9bef6c866f12eecb530ddb05.diff
Patch: https://github.com/kamailio/kamailio/commit/19968a464cbb668d9bef6c866f12eecb530ddb05.patch

---

diff --git a/modules/tm/t_funcs.c b/modules/tm/t_funcs.c
index e498713..f740a72 100644
--- a/modules/tm/t_funcs.c
+++ b/modules/tm/t_funcs.c
@@ -328,7 +328,7 @@ int t_relay_to( struct sip_msg  *p_msg , struct proxy_l *proxy, int proto,
 	ret=t_forward_nonack(t, p_msg, proxy, proto);
 handle_ret:
 	if (ret<=0) {
-		DBG( "ERROR:tm:t_relay_to:  t_forward_nonack returned error \n");
+		DBG( "t_forward_nonack returned error %d (%d)\n", ret, ser_error);
 		/* we don't want to pass upstream any reply regarding replicating
 		 * a request; replicated branch must stop at us*/
 		if (likely(!replicate)) {
diff --git a/modules/tm/t_fwd.c b/modules/tm/t_fwd.c
index dc97ad9..ba0b6d6 100644
--- a/modules/tm/t_fwd.c
+++ b/modules/tm/t_fwd.c
@@ -346,6 +346,7 @@ static int prepare_new_uac( struct cell *t, struct sip_msg *i_req,
 				keng = sr_kemi_eng_get();
 				if(unlikely(keng!=NULL)) {
 					bctx = sr_kemi_act_ctx_get();
+					init_run_actions_ctx(&ctx);
 					sr_kemi_act_ctx_set(&ctx);
 					if(keng->froute(i_req, BRANCH_ROUTE,
 							sr_kemi_cbname_lookup_idx(branch_route))<0) {
diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c
index 4ef8da4..dececd8 100644
--- a/modules/tm/t_reply.c
+++ b/modules/tm/t_reply.c
@@ -2343,6 +2343,7 @@ int reply_received( struct sip_msg  *p_msg )
 		 */
 		if(unlikely(keng!=NULL)) {
 			bctx = sr_kemi_act_ctx_get();
+			init_run_actions_ctx(&ctx);
 			sr_kemi_act_ctx_set(&ctx);
 			keng->froute(p_msg, TM_ONREPLY_ROUTE,
 					sr_kemi_cbname_lookup_idx(onreply_route));




More information about the sr-dev mailing list