[sr-dev] git:5.1:25987949: topos: set context when executing event route

Daniel-Constantin Mierla miconda at gmail.com
Wed Apr 10 11:35:36 CEST 2019


Module: kamailio
Branch: 5.1
Commit: 259879497ae9557256c4599811ffa142b088b101
URL: https://github.com/kamailio/kamailio/commit/259879497ae9557256c4599811ffa142b088b101

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-04-10T11:32:10+02:00

topos: set context when executing event route

- manual backporting for:
  403da8e8dcc2e4986595f183f0ac37a6bb41ab86
  d82a6cd45c1486f767b7fec2a02161f7314c9071

---

Modified: src/modules/topos/topos_mod.c

---

Diff:  https://github.com/kamailio/kamailio/commit/259879497ae9557256c4599811ffa142b088b101.diff
Patch: https://github.com/kamailio/kamailio/commit/259879497ae9557256c4599811ffa142b088b101.patch

---

diff --git a/src/modules/topos/topos_mod.c b/src/modules/topos/topos_mod.c
index 9dff909fee..2a13d51a49 100644
--- a/src/modules/topos/topos_mod.c
+++ b/src/modules/topos/topos_mod.c
@@ -495,10 +495,10 @@ static int tps_execute_event_route(sip_msg_t *msg, sr_event_param_t *evp)
 	set_route_type(REQUEST_ROUTE);
 	init_run_actions_ctx(&ctx);
 	if(_tps_eventrt_outgoing>=0) {
-		run_top_route(event_rt.rlist[_tps_eventrt_outgoing], fmsg, &ctx);
+		run_top_route(event_rt.rlist[_tps_eventrt_outgoing], (msg)?msg:fmsg, &ctx);
 	} else {
 		if(keng!=NULL) {
-			if(keng->froute(fmsg, EVENT_ROUTE,
+			if(sr_kemi_ctx_route(keng, &ctx, (msg)?msg:fmsg, EVENT_ROUTE,
 						&_tps_eventrt_callback, &_tps_eventrt_name)<0) {
 				LM_ERR("error running event route kemi callback\n");
 				p_onsend=NULL;
@@ -533,4 +533,4 @@ int bind_topos(topos_api_t *api)
 	api->get_branch_expire = tps_get_branch_expire;
 
 	return 0;
-}
\ No newline at end of file
+}




More information about the sr-dev mailing list