diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-01-03 17:22:12 -0600 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-01-03 12:33:36 -0600 |
commit | dcc282590b34537fc1ead61c3300172528273b44 (patch) | |
tree | 9890dda1e9f3001c23828caf1e8da1afbc3feb45 /source4/torture/basic | |
parent | dc8ccffed40ed5a5978961c632a9e28331a0fd4f (diff) | |
download | samba-dcc282590b34537fc1ead61c3300172528273b44.tar.gz samba-dcc282590b34537fc1ead61c3300172528273b44.tar.bz2 samba-dcc282590b34537fc1ead61c3300172528273b44.zip |
r26654: libcli/smb_composite: Rather than specifying each of the gazillion options for SMB individually, just specify the smbcli_options struct.
(This used to be commit 8a97886e24a4b969aa91409c06f423b71a45f6eb)
Diffstat (limited to 'source4/torture/basic')
-rw-r--r-- | source4/torture/basic/base.c | 5 | ||||
-rw-r--r-- | source4/torture/basic/misc.c | 8 |
2 files changed, 5 insertions, 8 deletions
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c index fcd788481b..aa729ec0df 100644 --- a/source4/torture/basic/base.c +++ b/source4/torture/basic/base.c @@ -40,6 +40,7 @@ static struct smbcli_state *open_nbt_connection(struct torture_context *tctx) struct nbt_name called, calling; struct smbcli_state *cli; const char *host = torture_setting_string(tctx, "host", NULL); + struct smbcli_options options; make_nbt_name_client(&calling, lp_netbios_name(tctx->lp_ctx)); @@ -51,7 +52,9 @@ static struct smbcli_state *open_nbt_connection(struct torture_context *tctx) goto failed; } - if (!smbcli_socket_connect(cli, host, lp_smb_ports(tctx->lp_ctx), lp_resolve_context(tctx->lp_ctx), lp_max_xmit(tctx->lp_ctx), lp_maxmux(tctx->lp_ctx), lp_nt_status_support(tctx->lp_ctx) && lp_use_spnego(tctx->lp_ctx), lp_client_signing(tctx->lp_ctx))) { + lp_smbcli_options(tctx->lp_ctx, &options); + + if (!smbcli_socket_connect(cli, host, lp_smb_ports(tctx->lp_ctx), lp_resolve_context(tctx->lp_ctx), &options)) { torture_comment(tctx, "Failed to connect with %s\n", host); goto failed; } diff --git a/source4/torture/basic/misc.c b/source4/torture/basic/misc.c index 986a4574a9..d991f117cd 100644 --- a/source4/torture/basic/misc.c +++ b/source4/torture/basic/misc.c @@ -821,13 +821,7 @@ static struct composite_context *torture_connect_async( smb->in.credentials=cmdline_credentials; smb->in.fallback_to_anonymous=false; smb->in.workgroup=workgroup; - smb->in.max_xmit = lp_max_xmit(tctx->lp_ctx); - smb->in.max_mux = lp_maxmux(tctx->lp_ctx); - smb->in.ntstatus_support = lp_nt_status_support(tctx->lp_ctx); - smb->in.max_protocol = lp_cli_maxprotocol(tctx->lp_ctx); - smb->in.unicode = lp_unicode(tctx->lp_ctx); - smb->in.use_spnego = lp_use_spnego(tctx->lp_ctx) && lp_nt_status_support(tctx->lp_ctx); - smb->in.signing = lp_client_signing(tctx->lp_ctx); + lp_smbcli_options(tctx->lp_ctx, &smb->in.options); return smb_composite_connect_send(smb,mem_ctx, lp_resolve_context(tctx->lp_ctx),ev); |