summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-08 09:37:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:19:23 -0500
commite897a570673d4c79361ed386ebdb14b0ec5a106c (patch)
tree96e99d00afd1d059fb70747ce10eb00970ec2118 /source4/scripting/ejs
parente81eb91e003f5eab18d6e6ed86d85c540660de85 (diff)
downloadsamba-e897a570673d4c79361ed386ebdb14b0ec5a106c.tar.gz
samba-e897a570673d4c79361ed386ebdb14b0ec5a106c.tar.bz2
samba-e897a570673d4c79361ed386ebdb14b0ec5a106c.zip
r8236: fixed support for arrays of structures
(This used to be commit cbe5289ac9a8adfe68704dc16a2b32ecbd15a4eb)
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;