Skip to content

Commit

Permalink
Changing default ICE nomination mode to 'aggressive' (see #2541)
Browse files Browse the repository at this point in the history
  • Loading branch information
lminiero committed Mar 19, 2021
1 parent 55abe06 commit 20dd2db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion conf/janus.jcfg.sample.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions ice.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,19 @@ 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;
} else if(!strcasecmp(nomination, "aggressive")) {
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) {
Expand Down

0 comments on commit 20dd2db

Please sign in to comment.