From efb3b25e29ca96eec9cc36a6613cdbe3ba5e0c92 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 19 Nov 2008 21:55:50 +0000 Subject: [PATCH] fine, have session in hangup hook apps, don't call me if it segs git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10467 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/languages/mod_spidermonkey/mod_spidermonkey.c | 3 --- src/switch_core_state_machine.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c index 1dade86a00..93dcf10e46 100644 --- a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c +++ b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c @@ -1773,7 +1773,6 @@ static JSBool session_set_variable(JSContext * cx, JSObject * obj, uintN argc, j struct js_session *jss = JS_GetPrivate(cx, obj); switch_channel_t *channel; - METHOD_SANITY_CHECK(); channel = switch_core_session_get_channel(jss->session); if (argc > 1) { @@ -2056,8 +2055,6 @@ static JSBool session_cdr(JSContext * cx, JSObject * obj, uintN argc, jsval * ar /*Always a pessimist... sheesh! */ *rval = BOOLEAN_TO_JSVAL(JS_FALSE); - METHOD_SANITY_CHECK(); - if (switch_ivr_generate_xml_cdr(jss->session, &cdr) == SWITCH_STATUS_SUCCESS) { char *xml_text; if ((xml_text = switch_xml_toxml(cdr, SWITCH_FALSE))) { diff --git a/src/switch_core_state_machine.c b/src/switch_core_state_machine.c index 16442f402f..ac50949842 100644 --- a/src/switch_core_state_machine.c +++ b/src/switch_core_state_machine.c @@ -413,7 +413,7 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session) } SWITCH_STANDARD_STREAM(stream); switch_channel_get_variables(session->channel, &stream.param_event); - switch_api_execute(cmd, arg, NULL, &stream); + switch_api_execute(cmd, arg, session, &stream); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hangup Command %s(%s):\n%s\n", cmd, arg, switch_str_nil((char *) stream.data)); switch_safe_free(stream.data);