summaryrefslogtreecommitdiff
path: root/source3/torture/torture.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-06-20 17:38:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:28 -0500
commitce02d0dfcbeeeec316578322257d998589090c6f (patch)
tree3855284b3cede5e054a0149b8afef432dfbcb318 /source3/torture/torture.c
parent04c75d9c95c5321d1fe5455671074b0e46f0df77 (diff)
downloadsamba-ce02d0dfcbeeeec316578322257d998589090c6f.tar.gz
samba-ce02d0dfcbeeeec316578322257d998589090c6f.tar.bz2
samba-ce02d0dfcbeeeec316578322257d998589090c6f.zip
r23554: Fix bug #4711 by makeing cli_connect return an NTSTATUS.
Long overdue fix.... Jeremy. (This used to be commit 073fdc5a58139796dbaa7ea9833dca5308f11282)
Diffstat (limited to 'source3/torture/torture.c')
-rw-r--r--source3/torture/torture.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 39495c6a3e..92599e2765 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -102,6 +102,7 @@ static struct cli_state *open_nbt_connection(void)
struct nmb_name called, calling;
struct in_addr ip;
struct cli_state *c;
+ NTSTATUS status;
make_nmb_name(&calling, myname, 0x0);
make_nmb_name(&called , host, 0x20);
@@ -115,8 +116,9 @@ static struct cli_state *open_nbt_connection(void)
c->port = port_to_use;
- if (!cli_connect(c, host, &ip)) {
- printf("Failed to connect with %s\n", host);
+ status = cli_connect(c, host, &ip);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("Failed to connect with %s. Error %s\n", host, nt_errstr(status) );
return NULL;
}
@@ -131,8 +133,9 @@ static struct cli_state *open_nbt_connection(void)
* Well, that failed, try *SMBSERVER ...
* However, we must reconnect as well ...
*/
- if (!cli_connect(c, host, &ip)) {
- printf("Failed to connect with %s\n", host);
+ status = cli_connect(c, host, &ip);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("Failed to connect with %s. Error %s\n", host, nt_errstr(status) );
return NULL;
}