[Freeswitch-svn] [commit] r7621 - in freeswitch/trunk/src: . include

Freeswitch SVN anthm at freeswitch.org
Fri Feb 15 12:54:14 EST 2008


Author: anthm
Date: Fri Feb 15 12:54:13 2008
New Revision: 7621

Modified:
   freeswitch/trunk/src/include/switch_types.h
   freeswitch/trunk/src/switch_time.c

Log:
update

Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h	(original)
+++ freeswitch/trunk/src/include/switch_types.h	Fri Feb 15 12:54:13 2008
@@ -296,12 +296,15 @@
 
 #define SWITCH_MAX_STACKS 32
 #define SWITCH_THREAD_STACKSIZE 240 * 1024
-#define SWITCH_RECOMMENDED_BUFFER_SIZE 8000
+#define SWITCH_MAX_INTERVAL 120
+#define SWITCH_RECOMMENDED_BUFFER_SIZE 64 * (SWITCH_MAX_INTERVAL + 10)
 #define SWITCH_MAX_CODECS 30
 #define SWITCH_MAX_STATE_HANDLERS 30
 #define SWITCH_CORE_QUEUE_LEN 100000
 #define SWITCH_MAX_MANAGEMENT_BUFFER_LEN 1024 * 8
 
+#define SWITCH_ACCEPTABLE_INTERVAL(_i) (_i <= SWITCH_MAX_INTERVAL && (_i % 10) == 0)
+
 typedef enum {
 	SWITCH_CPF_SCREEN = (1 << 0),
 	SWITCH_CPF_HIDE_NAME = (1 << 1),

Modified: freeswitch/trunk/src/switch_time.c
==============================================================================
--- freeswitch/trunk/src/switch_time.c	(original)
+++ freeswitch/trunk/src/switch_time.c	Fri Feb 15 12:54:13 2008
@@ -58,7 +58,7 @@
 SWITCH_MODULE_RUNTIME_FUNCTION(softtimer_runtime);
 SWITCH_MODULE_DEFINITION(softtimer, softtimer_load, softtimer_shutdown, softtimer_runtime);
 
-#define MAX_ELEMENTS 1000
+#define MAX_ELEMENTS 360
 #define IDLE_SPEED 100
 #define STEP_MS 1
 #define STEP_MIC 1000
@@ -340,14 +340,11 @@
 			tick = 0;
 		}
 
-		for (x = 0; x < MAX_ELEMENTS; x++) {
-			int i = x, index;
-			if (i == 0) {
-				i = 1;
-			}
-
-			index = (current_ms % i == 0) ? i : 0;
-
+		
+		for (x = 1; x <= MAX_ELEMENTS; x++) {
+			int i = x * 10;
+			int index = (current_ms % i == 0) ? i : 0;
+			
 			if (TIMER_MATRIX[index].count) {
 				TIMER_MATRIX[index].tick++;
 				if (TIMER_MATRIX[index].tick == MAX_TICK) {



More information about the Freeswitch-svn mailing list