From: Anthony Minessale Date: Thu, 25 Jan 2007 14:56:32 +0000 (+0000) Subject: make reg freq 2 sec less than you actually say to avoid crossfire and make the minimu... X-Git-Tag: v1.0-beta1~1296 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86bbb55e40afada81819e2fbf547d49a7f6427c3;p=thirdparty%2Ffreeswitch.git make reg freq 2 sec less than you actually say to avoid crossfire and make the minimum setting be 5 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4055 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index fc1d3eeb54..5cf356df4b 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -5109,7 +5109,12 @@ static switch_status_t config_sofia(int reload) oreg->expires_str = switch_core_strdup(oreg->pool, "300"); } - oreg->freq = atoi(oreg->expires_str); + if ((oreg->freq = atoi(oreg->expires_str)) < 5) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid Freq: %d. Setting Register-Frequency to 5\n", oreg->freq); + oreg->freq = 5; + } + oreg->freq -= 2; + oreg->next = profile->registrations; profile->registrations = oreg;