summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-06-16 12:00:38 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-06-16 12:00:38 -0500
commit0405185357d4d857af7375fa495c6893f943e249 (patch)
tree933af949a74edfee7362693c7ecf03ea6d79bb3b
parentd81293a5ddd545c8b2b3683306a17af91e41c102 (diff)
parent716abaf33dc13c41d95629f853a0850c9ef3e8ce (diff)
Merge "SDP: Search for the ice-lite attribute in the right place."
-rw-r--r--main/sdp_state.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/main/sdp_state.c b/main/sdp_state.c
index f27da211b..0f06bf9e3 100644
--- a/main/sdp_state.c
+++ b/main/sdp_state.c
@@ -875,6 +875,7 @@ static void update_ice(const struct ast_sdp_state *state, struct ast_rtp_instanc
{
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,10 +903,12 @@ static void update_ice(const struct ast_sdp_state *state, struct ast_rtp_instanc
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) {
char foundation[32];
@@ -931,9 +934,9 @@ static void update_ice(const struct ast_sdp_state *state, struct ast_rtp_instanc
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.
*/