From 17280956c3c412102150aa8a9bda48efff0f0214 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Tue, 6 Dec 2005 19:48:06 +0000 Subject: r12104: Move to (sync) smb_composite_connect from smbcli_tree_full_connection() This is one of the last places using the latter function. rafal (This used to be commit c95d30d38c4969c070766d320ed52e332e131195) --- source4/scripting/ejs/smbcalls_cli.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/source4/scripting/ejs/smbcalls_cli.c b/source4/scripting/ejs/smbcalls_cli.c index d7ffea29fe..cc97282038 100644 --- a/source4/scripting/ejs/smbcalls_cli.c +++ b/source4/scripting/ejs/smbcalls_cli.c @@ -25,6 +25,7 @@ #include "lib/appweb/ejs/ejs.h" #include "libcli/raw/libcliraw.h" #include "libcli/composite/composite.h" +#include "libcli/smb_composite/smb_composite.h" #include "clilist.h" #if 0 @@ -410,6 +411,7 @@ static int ejs_cli_disconnect(MprVarHandle eid, int argc, MprVar **argv) static int ejs_tree_connect(MprVarHandle eid, int argc, char **argv) { struct cli_credentials *creds; + struct smb_composite_connect io; struct smbcli_tree *tree; const char *hostname, *sharename; NTSTATUS result; @@ -433,8 +435,17 @@ static int ejs_tree_connect(MprVarHandle eid, int argc, char **argv) /* Do connect */ - result = smbcli_tree_full_connection(NULL, &tree, hostname, 0, - sharename, "?????", creds, NULL); + io.in.dest_host = hostname; + io.in.port = 0; + io.in.called_name = strupper_talloc(mem_ctx, hostname); + io.in.service = sharename; + io.in.service_type = "?????"; + io.in.credentials = creds; + io.in.fallback_to_anonymous = False; + io.in.workgroup = lp_workgroup(); + + result = smb_composite_connect(&io, mem_ctx, NULL); + tree = io.out.tree; talloc_free(mem_ctx); -- cgit