]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
make reg freq 2 sec less than you actually say to avoid crossfire and make the minimu...
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 25 Jan 2007 14:56:32 +0000 (14:56 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 25 Jan 2007 14:56:32 +0000 (14:56 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4055 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index fc1d3eeb54356d45046bfd271505ff37c54ef555..5cf356df4b43c8fa5b99c3fb5ad2c792e1e8fd35 100644 (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;