[asterisk-commits] SDP: Search for the ice-lite attribute in the right place. (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 16 12:00:38 CDT 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/5817 )

Change subject: SDP: Search for the ice-lite attribute in the right place.
......................................................................

SDP: Search for the ice-lite attribute in the right place.

* Pulled finding the rtcp-mux attribute flag out of the ICE candidate for
loop.  Also ordered the RTCP ICE candidate skip test to fail earlier.

Change-Id: I8905d9c68563027a46cd3ae14dbcc27e9c814809
---
M main/sdp_state.c
1 file changed, 7 insertions(+), 4 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
  Kevin Harwell: Looks good to me, approved



diff --git a/main/sdp_state.c b/main/sdp_state.c
index f27da21..0f06bf9 100644
--- a/main/sdp_state.c
+++ b/main/sdp_state.c
@@ -875,6 +875,7 @@
 {
 	struct ast_rtp_engine_ice *ice;
 	const struct ast_sdp_a_line *attr;
+	const struct ast_sdp_a_line *attr_rtcp_mux;
 	unsigned int attr_i;
 
 	/* If ICE support is not enabled or available exit early */
@@ -902,9 +903,11 @@
 		return;
 	}
 
-	if (ast_sdp_m_find_attribute(remote_m_line, "ice-lite", -1)) {
+	if (ast_sdp_find_attribute(remote_sdp, "ice-lite", -1)) {
 		ice->ice_lite(rtp);
 	}
+
+	attr_rtcp_mux = ast_sdp_m_find_attribute(remote_m_line, "rtcp-mux", -1);
 
 	/* Find all of the candidates */
 	for (attr_i = 0; attr_i < ast_sdp_m_get_a_count(remote_m_line); ++attr_i) {
@@ -931,9 +934,9 @@
 			continue;
 		}
 
-		if (ast_sdp_options_get_rtcp_mux(options)
-			&& ast_sdp_m_find_attribute(remote_m_line, "rtcp-mux", -1)
-			&& candidate.id > 1) {
+		if (candidate.id > 1
+			&& attr_rtcp_mux
+			&& ast_sdp_options_get_rtcp_mux(options)) {
 			/* Remote side may have offered RTP and RTCP candidates. However, if we're using RTCP MUX,
 			 * then we should ignore RTCP candidates.
 			 */

-- 
To view, visit https://gerrit.asterisk.org/5817
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I8905d9c68563027a46cd3ae14dbcc27e9c814809
Gerrit-Change-Number: 5817
Gerrit-PatchSet: 2
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170616/5c30739a/attachment-0001.html>


More information about the asterisk-commits mailing list