[sr-dev] git:tma0/iptrtpproxy-v2: - do not parse a= lines for disabled m= sections

Tomas Mandys tomas.mandys at iptel.org
Thu Oct 27 22:30:30 CEST 2011


Module: sip-router
Branch: tma0/iptrtpproxy-v2
Commit: 771bd72e47e37442789a64b8cb3fd9401f69abee
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=771bd72e47e37442789a64b8cb3fd9401f69abee

Author: Tomas Mandys <tomas.mandys at iptel.org>
Committer: Tomas Mandys <tomas.mandys at iptel.org>
Date:   Wed Sep  7 18:46:28 2011 +0200

- do not parse a= lines for disabled m= sections

---

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

diff --git a/modules/iptrtpproxy/iptrtpproxy.c b/modules/iptrtpproxy/iptrtpproxy.c
index 3ab0c10..d2ddf7c 100644
--- a/modules/iptrtpproxy/iptrtpproxy.c
+++ b/modules/iptrtpproxy/iptrtpproxy.c
@@ -825,6 +825,9 @@ static int parse_sdp_content(struct sip_msg* msg, struct sdp_session *sess) {
 
 				break;
 			case 'a':
+				if (sess_fl == 2 && sess->media[sess->media_count-1].port == 0) {
+					 break;  /* ignore parameters of disabled media section */
+				}
 				i = name2enum(&lvalue, &send_rec_modifiers);
 				if (i > 0) {
 					switch (sess_fl) {




More information about the sr-dev mailing list