[sr-dev] git:5.2:3d5e468a: core: propagate xflags inside sip_msg_update_buffer() to new msg

Daniel-Constantin Mierla miconda at gmail.com
Fri Feb 21 08:43:38 CET 2020


Module: kamailio
Branch: 5.2
Commit: 3d5e468acd49df316844bc985147e6a9592a877a
URL: https://github.com/kamailio/kamailio/commit/3d5e468acd49df316844bc985147e6a9592a877a

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-02-21T08:43:09+01:00

core: propagate xflags inside sip_msg_update_buffer() to new msg

- xflags were lost when the msg structure was reinitialized (e.g., after
msg_apply_chages())

(cherry picked from commit 2c6e87c50b13acdd94f77491eda0d73430f58dfc)
(cherry picked from commit 38869d54ed6210f63fceb185a6531193eed1629f)

---

Modified: src/core/msg_translator.c

---

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

---

diff --git a/src/core/msg_translator.c b/src/core/msg_translator.c
index 9898f32622..5ee3a5c5d9 100644
--- a/src/core/msg_translator.c
+++ b/src/core/msg_translator.c
@@ -3246,6 +3246,7 @@ int sip_msg_update_buffer(sip_msg_t *msg, str *obuf)
 	msg->set_global_port = tmp.set_global_port;
 	msg->flags = tmp.flags;
 	msg->msg_flags = tmp.msg_flags;
+	memcpy(msg->xflags, tmp.xflags, KSR_XFLAGS_SIZE * sizeof(flag_t));
 	msg->hash_index = tmp.hash_index;
 	msg->force_send_socket = tmp.force_send_socket;
 	msg->fwd_send_flags = tmp.fwd_send_flags;




More information about the sr-dev mailing list