[Freeswitch-svn] [commit] r4055 - freeswitch/trunk/src/mod/endpoints/mod_sofia

Freeswitch SVN anthm at freeswitch.org
Thu Jan 25 09:56:33 EST 2007


Author: anthm
Date: Thu Jan 25 09:56:32 2007
New Revision: 4055

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c

Log:
make reg freq 2 sec less than you actually say to avoid crossfire and make the minimum setting be 5

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	Thu Jan 25 09:56:32 2007
@@ -5109,7 +5109,12 @@
 								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;
 



More information about the Freeswitch-svn mailing list