summaryrefslogtreecommitdiff
path: root/source4/torture/basic
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-11-30 07:17:31 +0100
committerStefan Metzmacher <metze@samba.org>2011-11-30 13:41:08 +0100
commit4877be53df1181f75d603fa4edc67c34e1ba5141 (patch)
treeabc8c5f1a71ce84cfbd8b50ac4489d82f8e78e06 /source4/torture/basic
parentb51c92a903877015acf268ab8ff0e07d3a82b295 (diff)
downloadsamba-4877be53df1181f75d603fa4edc67c34e1ba5141.tar.gz
samba-4877be53df1181f75d603fa4edc67c34e1ba5141.tar.bz2
samba-4877be53df1181f75d603fa4edc67c34e1ba5141.zip
s4:libcli: move smbcli_transport_establish() logic into smbcli_socket_connect()
metze
Diffstat (limited to 'source4/torture/basic')
-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: