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

Freeswitch SVN anthm at freeswitch.org
Thu Nov 29 13:41:40 EST 2007


Author: anthm
Date: Thu Nov 29 13:41:40 2007
New Revision: 6437

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

Log:
update

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	Thu Nov 29 13:41:40 2007
@@ -133,6 +133,10 @@
 	JSObject *obj;
 	jsrefcount saveDepth;
 	void *extra;
+	struct js_session *jss_a;
+	struct js_session *jss_b;
+	JSObject *session_obj_a;
+	JSObject *session_obj_b;
 };
 
 struct fileio_obj {
@@ -1019,6 +1023,12 @@
 		argv[argc++] = cb_state->arg;
 	}
 
+	if (cb_state->jss_a && cb_state->jss_a->session && cb_state->jss_a->session == session) {
+		argv[argc++] = OBJECT_TO_JSVAL(cb_state->session_obj_a);
+	} else if (cb_state->jss_b && cb_state->jss_b->session && cb_state->jss_b->session == session) {
+		argv[argc++] = OBJECT_TO_JSVAL(cb_state->session_obj_b);
+	}
+
 	if (jss->stack_depth > MAX_STACK_DEPTH) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Maximum recursive callback limit %d reached.\n", MAX_STACK_DEPTH);
 		jss->stack_depth--;
@@ -3145,7 +3155,10 @@
 
 			cb_state.cx = cx;
 			cb_state.obj = obj;
-
+			cb_state.jss_a = jss_a;
+			cb_state.jss_b = jss_b;
+			cb_state.session_obj_a = session_obj_a;
+			cb_state.session_obj_b = session_obj_b;
 			cb_state.session_state = jss_a;
 			dtmf_func = js_collect_input_callback;
 			bp = &cb_state;



More information about the Freeswitch-trunk mailing list