[sr-dev] git:3.3: core: Fix parser sdp bug. Reset connection IP for each stream.

Vicente Hernando vhernando at systemonenoc.com
Mon Oct 8 21:27:00 CEST 2012


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

Author: Vicente Hernando <vhernando at systemonenoc.com>
Committer: Vicente Hernando <vhernando at systemonenoc.com>
Date:   Fri Sep  7 07:01:11 2012 -0400

core: Fix parser sdp bug. Reset connection IP for each stream.

If connection IP is not reset, then when a stream has no IP connection,
it uses former stream one instead of session default one.
(cherry picked from commit 971386c346d72a016d00c8808059bd4f0a050059)

---

 parser/sdp/sdp.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/parser/sdp/sdp.c b/parser/sdp/sdp.c
index 5521aec..28e8ab0 100644
--- a/parser/sdp/sdp.c
+++ b/parser/sdp/sdp.c
@@ -451,6 +451,8 @@ static int parse_sdp_session(str *sdp_body, int session_num, str *cnt_disp, sdp_
 		/* c2p will point to per-media "c=" */
 		c2p = find_sdp_line(m1p, m2p, 'c');
 
+		sdp_ip.s = NULL;
+		sdp_ip.len = 0;
 		if (c2p) {
 			/* Extract stream address */
 			tmpstr1.s = c2p;




More information about the sr-dev mailing list