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
This commit is contained in:
Anthony Minessale 2007-01-25 14:56:32 +00:00
parent b0eb04c065
commit 86bbb55e40

View File

@ -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;