Module: sip-router
Branch: master
Commit: 25a0534b11b5585eafa579d0ea3760438afd4ef7
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=25a0534b11b5585eafa579d0ea3760438afd4ef7

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date:   Tue Apr 29 00:12:16 2014 +0200

textopsx: msg_apply_changes() returns error if record route was added

---

 modules/textopsx/textopsx.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/modules/textopsx/textopsx.c b/modules/textopsx/textopsx.c
index 629681c..207eba6 100644
--- a/modules/textopsx/textopsx.c
+++ b/modules/textopsx/textopsx.c
@@ -164,6 +164,11 @@ static int msg_apply_changes_f(sip_msg_t *msg, char *str1, 
char *str2)
                obuf.s = generate_res_buf_from_sip_res(msg,
                                (unsigned int*)&obuf.len, BUILD_NO_VIA1_UPDATE);
        } else {
+               if(msg->msg_flags & FL_RR_ADDED) {
+                       LM_ERR("cannot apply msg changes after adding 
record-route"
+                                       " header - it breaks conditional 2nd 
header\n");
+                       return -1;
+               }
                obuf.s = build_req_buf_from_sip_req(msg,
                                (unsigned int*)&obuf.len, &dst,
                                
BUILD_NO_PATH|BUILD_NO_LOCAL_VIA|BUILD_NO_VIA1_UPDATE);


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to