mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-08 20:43:51 +00:00
fix up some event issues
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5541 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
46e564502a
commit
25057d40ac
3 files changed
+31
-15
No files matched your search
@@ -354,12 +354,12 @@ static JSBool event_construct(JSContext * cx, JSObject * obj, uintN argc, jsval
|
||||
|
||||
if (etype == SWITCH_EVENT_CUSTOM) {
|
||||
char *subclass_name;
|
||||
if (argc < 1) {
|
||||
*rval = BOOLEAN_TO_JSVAL(JS_FALSE);
|
||||
return JS_TRUE;
|
||||
if (argc > 1) {
|
||||
subclass_name = JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
|
||||
} else {
|
||||
subclass_name = "none";
|
||||
}
|
||||
|
||||
subclass_name = JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
|
||||
if (switch_event_create_subclass(&event, etype, subclass_name) != SWITCH_STATUS_SUCCESS) {
|
||||
*rval = BOOLEAN_TO_JSVAL(JS_FALSE);
|
||||
return JS_TRUE;
|
||||
|
||||
Reference in new issue
Block a user