From 452db683d0b6513fcce4d4ad6d33a6e4f65cbb5a Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 11 Mar 2019 13:38:07 -0400 Subject: [PATCH] as per docs, remove all relay candidates under force-relay fixes #728 Change-Id: I2828d4d9d5832d7248ea78b48bd38dba9592cca1 (cherry picked from commit 661994e3626dca1041ce0b505afb4bf95c1867a6) --- daemon/sdp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/sdp.c b/daemon/sdp.c index f15d11f07..9e6176b0b 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -1684,8 +1684,6 @@ static int process_media_attributes(struct sdp_chopper *chop, struct sdp_media * goto strip; case ATTR_CANDIDATE: - if (MEDIA_ISSET(media, PASSTHRU)) - break; if (flags->ice_force_relay) { if ((attr->u.candidate.type_str.len == 5) && (strncasecmp(attr->u.candidate.type_str.s, "relay", 5) == 0)) @@ -1693,6 +1691,8 @@ static int process_media_attributes(struct sdp_chopper *chop, struct sdp_media * else break; } + if (MEDIA_ISSET(media, PASSTHRU)) + break; if (!flags->ice_remove && !flags->ice_force) break; goto strip;