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

Author: Juha Heinanen <[email protected]>
Committer: Juha Heinanen <[email protected]>
Date:   Mon Oct  5 15:13:56 2009 +0300

modules_k/msilo: send composed body only if content type is text/plain

---

 modules_k/msilo/msilo.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/modules_k/msilo/msilo.c b/modules_k/msilo/msilo.c
index 58f31a1..7c9cefa 100644
--- a/modules_k/msilo/msilo.c
+++ b/modules_k/msilo/msilo.c
@@ -1044,7 +1044,13 @@ static int m_dump(struct sip_msg* msg, char* owner, 
char* str2)
                        
                /** sending using TM function: t_uac */
                body_str.len = 1024;
-               n = m_build_body(&body_str, rtime, str_vals[2/*body*/], 0);
+               /* send composed body only if content type is text/plain */
+               if ((str_vals[3].len == 10) &&
+                   (strncmp(str_vals[3].s, "text/plain", 10) == 0)) {
+                   n = m_build_body(&body_str, rtime, str_vals[2/*body*/], 0);
+               } else {
+                   n = -1;
+               }
                if(n<0)
                        LM_DBG("sending simple body\n");
                else


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

Reply via email to