[sr-dev] git:5.1:d2d3491a: tmx: bug fix in cancel for current branches in helper, reported in GH #1620

Henning Westerholt hw at kamailio.org
Mon Aug 13 21:21:59 CEST 2018


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

Author: Henning Westerholt <hw at kamailio.org>
Committer: Henning Westerholt <hw at kamailio.org>
Date: 2018-08-13T21:21:46+02:00

tmx: bug fix in cancel for current branches in helper, reported in GH #1620

(cherry picked from commit 8a66803610f2c822f319899cd2bf8675615348bc)

---

Modified: src/modules/tmx/tmx_mod.c

---

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

---

diff --git a/src/modules/tmx/tmx_mod.c b/src/modules/tmx/tmx_mod.c
index 770fcc20bf..28c68d4704 100644
--- a/src/modules/tmx/tmx_mod.c
+++ b/src/modules/tmx/tmx_mod.c
@@ -318,6 +318,8 @@ static int t_cancel_branches_helper(sip_msg_t* msg, int n)
 	if(tcx != NULL)
 		idx = tcx->branch_index;
 	init_cancel_info(&cancel_data);
+	/* tm function: prepare_to_cancel(struct cell *t, branch_bm_t *cancel_bm,
+	                                                branch_bm_t skip_branches) */
 	switch(n) {
 		case 1:
 			/* prepare cancel for every branch except idx (others) */
@@ -329,6 +331,7 @@ static int t_cancel_branches_helper(sip_msg_t* msg, int n)
 			if(msg->first_line.u.reply.statuscode>=200)
 				break;
 			cancel_data.cancel_bitmap = 1<<idx;
+			 _tmx_tmb.prepare_to_cancel(t, &cancel_data.cancel_bitmap, 0);
 			break;
 		default:
 			/* prepare cancel for all branches */




More information about the sr-dev mailing list