mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 16:15:04 +00:00
Let session.destroy() take the cause as a string too
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13020 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
d406399afe
commit
b814ad0de4
@ -2233,6 +2233,9 @@ static JSBool session_detach(JSContext * cx, JSObject * obj, uintN argc, jsval *
|
||||
int32 i = 0;
|
||||
JS_ValueToInt32(cx, argv[0], &i);
|
||||
cause = i;
|
||||
} else {
|
||||
const char *cause_name = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
|
||||
cause = switch_channel_str2cause(cause_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user