summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/ejs')
-rw-r--r--source4/scripting/ejs/ejsrpc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/scripting/ejs/ejsrpc.c b/source4/scripting/ejs/ejsrpc.c
index ab0f64d5aa..94987d69e1 100644
--- a/source4/scripting/ejs/ejsrpc.c
+++ b/source4/scripting/ejs/ejsrpc.c
@@ -126,7 +126,7 @@ static NTSTATUS mprSetVar(struct MprVar *v, const char *name, struct MprVar val)
*/
NTSTATUS ejs_pull_struct_start(struct ejs_rpc *ejs, struct MprVar **v, const char *name)
{
- *v = mprGetProperty(*v, name, NULL);
+ *v = mprGetVar(*v, name);
if (*v == NULL) {
DEBUG(1,("ejs_pull_struct_start: missing structure '%s'\n", name));
return NT_STATUS_INVALID_PARAMETER;
@@ -140,10 +140,10 @@ NTSTATUS ejs_pull_struct_start(struct ejs_rpc *ejs, struct MprVar **v, const cha
*/
NTSTATUS ejs_push_struct_start(struct ejs_rpc *ejs, struct MprVar **v, const char *name)
{
- struct MprVar s = mprCreateObjVar(name, MPR_DEFAULT_HASH_SIZE);
- *v = mprSetProperty(*v, name, &s);
+ NDR_CHECK(mprSetVar(*v, name, mprCreateObjVar(name, MPR_DEFAULT_HASH_SIZE)));
+ *v = mprGetVar(*v, name);
if (*v == NULL) {
- DEBUG(1,("ejs_push_struct_start: unable to set structure '%s'\n", name));
+ DEBUG(1,("ejs_push_struct_start: missing structure '%s'\n", name));
return NT_STATUS_INVALID_PARAMETER;
}
return NT_STATUS_OK;