diff options
Diffstat (limited to 'source4/scripting/ejs')
-rw-r--r-- | source4/scripting/ejs/smbcalls_cli.c | 12 | ||||
-rw-r--r-- | source4/scripting/ejs/smbcalls_rpc.c | 5 |
2 files changed, 9 insertions, 8 deletions
diff --git a/source4/scripting/ejs/smbcalls_cli.c b/source4/scripting/ejs/smbcalls_cli.c index e94207bf36..fc26fddfd5 100644 --- a/source4/scripting/ejs/smbcalls_cli.c +++ b/source4/scripting/ejs/smbcalls_cli.c @@ -483,7 +483,7 @@ static int ejs_tree_disconnect(MprVarHandle eid, int argc, MprVar **argv) return -1; } - tree = talloc_check_name(argv[0]->ptr, "struct smbcli_tree"); + tree = talloc_get_type(argv[0]->ptr, struct smbcli_tree); result = smb_tree_disconnect(tree); @@ -512,7 +512,7 @@ static int ejs_mkdir(MprVarHandle eid, int argc, MprVar **argv) return -1; } - tree = argv[0]->ptr; + tree = (struct smbcli_tree *)argv[0]->ptr; if (!mprVarIsString(argv[1]->type)) { ejsSetErrorMsg(eid, "arg 2 must be a string"); @@ -546,7 +546,7 @@ static int ejs_rmdir(MprVarHandle eid, int argc, MprVar **argv) return -1; } - tree = argv[0]->ptr; + tree = (struct smbcli_tree *)argv[0]->ptr; if (!mprVarIsString(argv[1]->type)) { ejsSetErrorMsg(eid, "arg 2 must be a string"); @@ -580,7 +580,7 @@ static int ejs_rename(MprVarHandle eid, int argc, MprVar **argv) return -1; } - tree = argv[0]->ptr; + tree = (struct smbcli_tree *)argv[0]->ptr; if (!mprVarIsString(argv[1]->type)) { ejsSetErrorMsg(eid, "arg 2 must be a string"); @@ -619,7 +619,7 @@ static int ejs_unlink(MprVarHandle eid, int argc, MprVar **argv) return -1; } - tree = argv[0]->ptr; + tree = (struct smbcli_tree *)argv[0]->ptr; if (!mprVarIsString(argv[1]->type)) { ejsSetErrorMsg(eid, "arg 2 must be a string"); @@ -666,7 +666,7 @@ static int ejs_list(MprVarHandle eid, int argc, MprVar **argv) return -1; } - tree = argv[0]->ptr; + tree = (struct smbcli_tree *)argv[0]->ptr; if (!mprVarIsString(argv[1]->type)) { ejsSetErrorMsg(eid, "arg 2 must be a string"); diff --git a/source4/scripting/ejs/smbcalls_rpc.c b/source4/scripting/ejs/smbcalls_rpc.c index 4addd473da..b95681d4ef 100644 --- a/source4/scripting/ejs/smbcalls_rpc.c +++ b/source4/scripting/ejs/smbcalls_rpc.c @@ -144,7 +144,8 @@ static int ejs_rpc_connect(MprVarHandle eid, int argc, char **argv) credentials = mprGetProperty(this, "credentials", NULL); if (credentials) { - creds = mprGetPtr(credentials, "creds"); + creds = (struct cli_credentials *) + mprGetPtr(credentials, "creds"); } else { creds = cmdline_credentials; } @@ -188,7 +189,7 @@ static int ejs_irpc_call(int eid, struct MprVar *io, int i, count; struct MprVar *results; - p = mprGetThisPtr(eid, "irpc"); + p = (struct ejs_irpc_connection *)mprGetThisPtr(eid, "irpc"); ejs = talloc(mprMemCtx(), struct ejs_rpc); if (ejs == NULL) { |