[sr-dev] git:master:d0668c77: tm: resync xflags on new t_newtran() attempt

Daniel-Constantin Mierla miconda at gmail.com
Wed Apr 11 15:14:44 CEST 2018


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-04-11T15:09:40+02:00

tm: resync xflags on new t_newtran() attempt

- have the same behaviour as for flags
- reported by GH #1490

---

Modified: src/modules/tm/t_lookup.c

---

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

---

diff --git a/src/modules/tm/t_lookup.c b/src/modules/tm/t_lookup.c
index 49d02111f1..494afd457c 100644
--- a/src/modules/tm/t_lookup.c
+++ b/src/modules/tm/t_lookup.c
@@ -1326,8 +1326,11 @@ int t_newtran( struct sip_msg* p_msg )
 		/* t_newtran() has been already called, and the script
 		 * might changed the flags after it, so we must update the flags
 		 * in shm memory -- Miklos */
-		if (T->uas.request)
+		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));
+		}
 
 		return E_SCRIPT;
 	}




More information about the sr-dev mailing list