From 01506f4fca3f824e4edcef2bf6cc414129bb1b24 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Fri, 24 Jun 2016 15:03:54 +0200 Subject: [PATCH] Do not defer call update for ICE candidates gathering when the ICE session returned that gathering is not needed. --- coreapi/misc.c | 5 +++-- mediastreamer2 | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/coreapi/misc.c b/coreapi/misc.c index 111a1828d..6f713553c 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -743,12 +743,13 @@ int linphone_core_gather_ice_candidates(LinphoneCore *lc, LinphoneCall *call){ } if ((ai != NULL) && (nat_policy != NULL) && (linphone_nat_policy_stun_enabled(nat_policy) || linphone_nat_policy_turn_enabled(nat_policy))) { + bool_t gathering_in_progress; ms_message("ICE: gathering candidate from [%s] using %s", server, linphone_nat_policy_turn_enabled(nat_policy) ? "TURN" : "STUN"); /* Gather local srflx candidates. */ ice_session_enable_turn(call->ice_session, linphone_nat_policy_turn_enabled(nat_policy)); ice_session_set_stun_auth_requested_cb(call->ice_session, (MSStunAuthRequestedCb)stun_auth_requested_cb, call); - ice_session_gather_candidates(call->ice_session, ai->ai_addr, (socklen_t)ai->ai_addrlen); - return 1; + gathering_in_progress = ice_session_gather_candidates(call->ice_session, ai->ai_addr, (socklen_t)ai->ai_addrlen); + return (gathering_in_progress == FALSE) ? 0 : 1; } else { ms_message("ICE: bypass candidates gathering"); ice_session_compute_candidates_foundations(call->ice_session); diff --git a/mediastreamer2 b/mediastreamer2 index 417a1bb88..b8d8b9dd7 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 417a1bb884dfb54758c82a5f642977ee99b1ba7b +Subproject commit b8d8b9dd7323a3043c9c78a053fdf4468123703e