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;
|
int32 i = 0;
|
||||||
JS_ValueToInt32(cx, argv[0], &i);
|
JS_ValueToInt32(cx, argv[0], &i);
|
||||||
cause = i;
|
cause = i;
|
||||||
|
} else {
|
||||||
|
const char *cause_name = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
|
||||||
|
cause = switch_channel_str2cause(cause_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue