[Freeswitch-svn] [commit] r5553 - freeswitch/trunk/src/mod/languages/mod_spidermonkey
Freeswitch SVN
mikej at freeswitch.org
Fri Aug 3 00:06:58 EDT 2007
Author: mikej
Date: Fri Aug 3 00:06:58 2007
New Revision: 5553
Modified:
freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
Log:
fix for MODLANG-37
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 Fri Aug 3 00:06:58 2007
@@ -1527,15 +1527,15 @@
CHANNEL_SANITY_CHECK();
- if (argc > 0) {
- tts_name = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
- }
- if (argc > 1) {
- voice_name = JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
- }
- if (argc > 2) {
- text = JS_GetStringBytes(JS_ValueToString(cx, argv[2]));
- }
+ if (argc < 3) {
+ *rval = BOOLEAN_TO_JSVAL(JS_FALSE);
+ return JS_FALSE;
+ }
+
+ tts_name = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
+ voice_name = JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
+ text = JS_GetStringBytes(JS_ValueToString(cx, argv[2]));
+
if (argc > 3) {
if ((function = JS_ValueToFunction(cx, argv[3]))) {
memset(&cb_state, 0, sizeof(cb_state));
More information about the Freeswitch-svn
mailing list