summaryrefslogtreecommitdiff
path: root/source4/torture/basic/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/basic/base.c')
-rw-r--r--source4/torture/basic/base.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index 519ad406fe..d1005d0bdc 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 smbcli_state *cli;
const char *host = torture_setting_string(tctx, "host", NULL);
struct smbcli_options options;
+ bool ok;
make_nbt_name_client(&calling, lpcfg_netbios_name(tctx->lp_ctx));
@@ -53,18 +54,17 @@ static struct smbcli_state *open_nbt_connection(struct torture_context *tctx)
lpcfg_smbcli_options(tctx->lp_ctx, &options);
- if (!smbcli_socket_connect(cli, host, lpcfg_smb_ports(tctx->lp_ctx), tctx->ev,
- lpcfg_resolve_context(tctx->lp_ctx), &options,
- lpcfg_socket_options(tctx->lp_ctx))) {
+ ok = smbcli_socket_connect(cli, host, lpcfg_smb_ports(tctx->lp_ctx),
+ tctx->ev,
+ lpcfg_resolve_context(tctx->lp_ctx),
+ &options,
+ lpcfg_socket_options(tctx->lp_ctx),
+ &calling, &called);
+ if (!ok) {
torture_comment(tctx, "Failed to connect with %s\n", host);
goto failed;
}
- if (!smbcli_transport_establish(cli, &calling, &called)) {
- torture_comment(tctx, "%s rejected the session\n",host);
- goto failed;
- }
-
return cli;
failed: