From 20dd2db2c60a99fb89a26e2ae53750ebab66da38 Mon Sep 17 00:00:00 2001 From: Lorenzo Miniero Date: Fri, 19 Mar 2021 09:48:52 +0100 Subject: [PATCH] Changing default ICE nomination mode to 'aggressive' (see #2541) --- conf/janus.jcfg.sample.in | 2 +- ice.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/janus.jcfg.sample.in b/conf/janus.jcfg.sample.in index d1a4a0b518..83aea703dc 100644 --- a/conf/janus.jcfg.sample.in +++ b/conf/janus.jcfg.sample.in @@ -242,7 +242,7 @@ media: { # it should work in ICE-Lite mode (by default it doesn't). If libnice is # at least 0.1.15, you can choose which ICE nomination mode to use: valid # values are "regular" and "aggressive" (the default depends on the libnice -# version itself; if we can set it, we set regular nomination). You can +# version itself; if we can set it, we set aggressive nomination). You can # also configure whether to use connectivity checks as keep-alives, which # might help detecting when a peer is no longer available (notice that # current libnice master is breaking connections after 50 seconds when diff --git a/ice.c b/ice.c index 8180d619c7..1e21e1c67c 100644 --- a/ice.c +++ b/ice.c @@ -103,11 +103,11 @@ gboolean janus_ice_is_ipv6_enabled(void) { #ifdef HAVE_ICE_NOMINATION /* Since libnice 0.1.15, we can configure the ICE nomination mode: it was - * always "aggressive" before, we set it to "regular" by default if we can */ -static NiceNominationMode janus_ice_nomination = NICE_NOMINATION_MODE_REGULAR; + * always "aggressive" before, so we set it to "aggressive" by default as well */ +static NiceNominationMode janus_ice_nomination = NICE_NOMINATION_MODE_AGGRESSIVE; void janus_ice_set_nomination_mode(const char *nomination) { if(nomination == NULL) { - JANUS_LOG(LOG_WARN, "Invalid ICE nomination mode, falling back to 'regular'\n"); + JANUS_LOG(LOG_WARN, "Invalid ICE nomination mode, falling back to 'aggressive'\n"); } else if(!strcasecmp(nomination, "regular")) { JANUS_LOG(LOG_INFO, "Configuring Janus to use ICE regular nomination\n"); janus_ice_nomination = NICE_NOMINATION_MODE_REGULAR; @@ -115,7 +115,7 @@ void janus_ice_set_nomination_mode(const char *nomination) { JANUS_LOG(LOG_INFO, "Configuring Janus to use ICE aggressive nomination\n"); janus_ice_nomination = NICE_NOMINATION_MODE_AGGRESSIVE; } else { - JANUS_LOG(LOG_WARN, "Unsupported ICE nomination mode '%s', falling back to 'regular'\n", nomination); + JANUS_LOG(LOG_WARN, "Unsupported ICE nomination mode '%s', falling back to 'aggressive'\n", nomination); } } const char *janus_ice_get_nomination_mode(void) {