[sr-dev] git:master:2af701f0: tm: set xflags in private clone for execution on reply route

Daniel-Constantin Mierla miconda at gmail.com
Mon Mar 26 09:38:11 CEST 2018


Module: kamailio
Branch: master
Commit: 2af701f0a1df5d3c705f614167c9e815ddcc1708
URL: https://github.com/kamailio/kamailio/commit/2af701f0a1df5d3c705f614167c9e815ddcc1708

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-03-26T09:37:19+02:00

tm: set xflags in private clone for execution on reply route

---

Modified: src/modules/tm/t_reply.c

---

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

---

diff --git a/src/modules/tm/t_reply.c b/src/modules/tm/t_reply.c
index ae6befd835..d7a102e014 100644
--- a/src/modules/tm/t_reply.c
+++ b/src/modules/tm/t_reply.c
@@ -2342,7 +2342,11 @@ int reply_received( struct sip_msg  *p_msg )
 		replies_locked=1;
 
 		/* transfer transaction flag to message context */
-		if (t->uas.request) p_msg->flags=t->uas.request->flags;
+		if (t->uas.request) {
+			p_msg->flags=t->uas.request->flags;
+			memcpy(p_msg->xflags, t->uas.request->xflags,
+				KSR_XFLAGS_SIZE * sizeof(flag_t));
+		}
 		/* set the as avp_list the one from transaction */
 
 		backup_uri_from = set_avp_list(AVP_TRACK_FROM | AVP_CLASS_URI,
@@ -2387,7 +2391,11 @@ int reply_received( struct sip_msg  *p_msg )
 		/* restore brach last_received as before executing onreply_route */
 		uac->last_received = last_uac_status;
 		/* transfer current message context back to t */
-		if (t->uas.request) t->uas.request->flags=p_msg->flags;
+		if (t->uas.request) {
+			t->uas.request->flags=p_msg->flags;
+			memcpy(t->uas.request->xflags, p_msg->xflags,
+				KSR_XFLAGS_SIZE * sizeof(flag_t));
+		}
 		getbflagsval(0, &uac->branch_flags);
 
 		/* restore original avp list */




More information about the sr-dev mailing list