diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-08-08 03:20:17 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:31:31 -0500 |
commit | 2b31c6d9d0d853d6be0a7e4f42977029389fc5ce (patch) | |
tree | 6ea3ca7432109d4c2252d1136d182076ea89ad11 /source4/scripting/ejs/smbcalls_rpc.c | |
parent | a689b968b6c1b47b0425f753472f1e221d2dea67 (diff) | |
download | samba-2b31c6d9d0d853d6be0a7e4f42977029389fc5ce.tar.gz samba-2b31c6d9d0d853d6be0a7e4f42977029389fc5ce.tar.bz2 samba-2b31c6d9d0d853d6be0a7e4f42977029389fc5ce.zip |
r9210: fixed support for a credentials element in a rpc object in ejs to not
give lots of warnings of missing properties
(This used to be commit 15737abd747cea561eca92103919f4adc22c6fcd)
Diffstat (limited to 'source4/scripting/ejs/smbcalls_rpc.c')
-rw-r--r-- | source4/scripting/ejs/smbcalls_rpc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/scripting/ejs/smbcalls_rpc.c b/source4/scripting/ejs/smbcalls_rpc.c index f5b71b6715..cbb8d9dd9d 100644 --- a/source4/scripting/ejs/smbcalls_rpc.c +++ b/source4/scripting/ejs/smbcalls_rpc.c @@ -112,6 +112,7 @@ static int ejs_rpc_connect(MprVarHandle eid, int argc, char **argv) struct cli_credentials *creds; struct event_context *ev; struct MprVar *this = mprGetProperty(ejsGetLocalObject(eid), "this", 0); + struct MprVar *credentials; /* validate arguments */ if (argc < 1) { @@ -137,8 +138,10 @@ static int ejs_rpc_connect(MprVarHandle eid, int argc, char **argv) goto done; } - creds = mprGetPtr(this, "credentials.creds"); - if (creds == NULL) { + credentials = mprGetProperty(this, "credentials", NULL); + if (credentials) { + creds = mprGetPtr(credentials, "creds"); + } else { creds = cmdline_credentials; } if (creds == NULL) { |