From: Anthony Minessale Date: Wed, 23 Apr 2008 14:57:03 +0000 (+0000) Subject: update X-Git-Tag: v1.0-rc4~81 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fb841bf6b251bea054d8d9e1b7f2e05a422e7ca;p=thirdparty%2Ffreeswitch.git update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8175 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c index 1fe29942f2..480cfb7f4f 100644 --- a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c +++ b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c @@ -2752,6 +2752,7 @@ static JSBool session_originate(JSContext * cx, JSObject * obj, uintN argc, jsva } jss->session = peer_session; + switch_set_flag(jss, S_HUP); *rval = BOOLEAN_TO_JSVAL(JS_TRUE); switch_channel_set_state(switch_core_session_get_channel(jss->session), CS_TRANSMIT); @@ -2781,7 +2782,7 @@ static void session_destroy(JSContext * cx, JSObject * obj) switch_channel_set_private(channel, "jss", NULL); switch_core_event_hook_remove_state_change(session, hanguphook); - if (switch_test_flag(jss, S_HUP) || switch_channel_get_state(channel) != CS_EXECUTE) { + if (switch_test_flag(jss, S_HUP)) { switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING); }