Author: mimir Date: 2005-12-06 19:48:06 +0000 (Tue, 06 Dec 2005) New Revision: 12104
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12104 Log: Move to (sync) smb_composite_connect from smbcli_tree_full_connection() This is one of the last places using the latter function. rafal Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_cli.c Changeset: Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_cli.c =================================================================== --- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_cli.c 2005-12-06 19:44:49 UTC (rev 12103) +++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_cli.c 2005-12-06 19:48:06 UTC (rev 12104) @@ -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_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,9 +435,18 @@ /* 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); if (!NT_STATUS_IS_OK(result)) {
