[Freeswitch-svn] [commit] r10542 - freeswitch/trunk/src/mod/languages/mod_spidermonkey

FreeSWITCH SVN anthm at freeswitch.org
Wed Nov 26 10:19:59 PST 2008


Author: anthm
Date: Wed Nov 26 13:19:59 2008
New Revision: 10542

Log:
fix timeout defaults

Modified:
   freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c

Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	Wed Nov 26 13:19:59 2008
@@ -2101,7 +2101,7 @@
 	switch_channel_t *channel;
 	switch_time_t started;
 	unsigned int elapsed;
-	int32 timeout = 60;
+	int32 timeout = 60000;
 	jsrefcount saveDepth;
 	jsval ret = JS_TRUE;
 
@@ -2114,7 +2114,11 @@
 
 	if (argc > 0) {
 		JS_ValueToInt32(cx, argv[0], &timeout);
+		if (timeout < 1000) {
+			timeout = 1000;
+		}
 	}
+
 	if (check_hangup_hook(jss, NULL) != JS_TRUE) {
 		return JS_FALSE;
 	}
@@ -2146,7 +2150,7 @@
 	switch_channel_t *channel;
 	switch_time_t started;
 	unsigned int elapsed;
-	int32 timeout = 60;
+	int32 timeout = 60000;
 	jsrefcount saveDepth;
 	jsval ret = JS_TRUE;
 	
@@ -2157,6 +2161,9 @@
 
 	if (argc > 0) {
 		JS_ValueToInt32(cx, argv[0], &timeout);
+		if (timeout < 1000) {
+			timeout = 1000;
+		}
 	}
 
 	if (check_hangup_hook(jss, NULL) != JS_TRUE) {



More information about the Freeswitch-svn mailing list