From 5dbd79765186d46e62491af1c60e1fb6bf923198 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 29 Dec 2020 13:23:58 -0500 Subject: [PATCH] TT#94201 fix ICE=default to the intended behaviour closes #1147 Change-Id: I545b37d1cdb5848ad437da150ef23e5df4045833 --- daemon/call.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index ac3fa5158..f6edf8df7 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -1249,16 +1249,14 @@ static void __ice_offer(const struct sdp_ng_flags *flags, struct call_media *thi if (!flags) return; - /* we offer ICE by default */ + // the default is to pass through the offering client's choice if (!MEDIA_ISSET(this, INITIALIZED)) - MEDIA_SET(this, ICE); + bf_copy_same(&this->media_flags, &other->media_flags, MEDIA_FLAG_ICE); // unless instructed not to - if (flags->ice_option == ICE_DEFAULT) { - if (!MEDIA_ISSET(other, ICE)) - MEDIA_CLEAR(this, ICE); - } - else if (flags->ice_option == ICE_REMOVE) + if (flags->ice_option == ICE_REMOVE) MEDIA_CLEAR(this, ICE); + else if (flags->ice_option != ICE_DEFAULT) + MEDIA_SET(this, ICE); if (flags->passthrough_on) { ilog(LOG_DEBUG, "enabling passthrough mode");