From e897a570673d4c79361ed386ebdb14b0ec5a106c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 8 Jul 2005 09:37:54 +0000 Subject: r8236: fixed support for arrays of structures (This used to be commit cbe5289ac9a8adfe68704dc16a2b32ecbd15a4eb) --- source4/scripting/ejs/ejsrpc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/scripting/ejs') 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; -- cgit