mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-18 01:28:42 +00:00
fix core db for js
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5437 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
cb766bf817
commit
c6af283b83
@ -242,6 +242,16 @@ static JSPropertySpec db_props[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static JSBool db_setProperty(JSContext * cx, JSObject * obj, jsval id, jsval *vp)
|
||||||
|
{
|
||||||
|
char *name = JS_GetStringBytes(JS_ValueToString(cx, id));
|
||||||
|
|
||||||
|
if (strcmp(name, "_dB_RoW_DaTa_")) {
|
||||||
|
*vp = BOOLEAN_TO_JSVAL(JS_FALSE);
|
||||||
|
}
|
||||||
|
return JS_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static JSBool db_getProperty(JSContext * cx, JSObject * obj, jsval id, jsval * vp)
|
static JSBool db_getProperty(JSContext * cx, JSObject * obj, jsval id, jsval * vp)
|
||||||
{
|
{
|
||||||
JSBool res = JS_TRUE;
|
JSBool res = JS_TRUE;
|
||||||
@ -268,7 +278,7 @@ static JSBool db_getProperty(JSContext * cx, JSObject * obj, jsval id, jsval * v
|
|||||||
|
|
||||||
JSClass db_class = {
|
JSClass db_class = {
|
||||||
modname, JSCLASS_HAS_PRIVATE,
|
modname, JSCLASS_HAS_PRIVATE,
|
||||||
JS_PropertyStub, JS_PropertyStub, db_getProperty, DEFAULT_SET_PROPERTY,
|
JS_PropertyStub, JS_PropertyStub, db_getProperty, db_setProperty,
|
||||||
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, db_destroy, NULL, NULL, NULL,
|
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, db_destroy, NULL, NULL, NULL,
|
||||||
db_construct
|
db_construct
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user