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

Freeswitch SVN mikej at freeswitch.org
Fri Aug 3 12:13:32 EDT 2007


Author: mikej
Date: Fri Aug  3 12:13:32 2007
New Revision: 5562

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

Log:
fix for MODLANG-38

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 12:13:32 2007
@@ -1527,10 +1527,10 @@
 
 	CHANNEL_SANITY_CHECK();
 
-	if (argc < 3) {
-		*rval = BOOLEAN_TO_JSVAL(JS_FALSE);
-		return JS_FALSE;
-	}
+	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]));
@@ -2311,7 +2311,7 @@
 
 		if (JS_ValueToObject(cx, argv[0], &session_obj)) {
 			struct js_session *old_jss = NULL;
-			if ((old_jss = JS_GetPrivate(cx, session_obj))) {
+			if ((old_jss = JS_GetPrivate(cx, session_obj)) && old_jss->session) {
 				session = old_jss->session;
 				orig_caller_profile = switch_channel_get_caller_profile(switch_core_session_get_channel(session));
 				dialplan = orig_caller_profile->dialplan;



More information about the Freeswitch-svn mailing list