git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8175 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-04-23 14:57:03 +00:00
parent 1b5a7779ec
commit 1fb841bf6b

View File

@ -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);
}