summaryrefslogtreecommitdiffstats
path: root/source3/torture/torture.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-01-03 18:46:57 +0100
committerVolker Lendecke <vl@samba.org>2010-01-03 21:14:57 +0100
commit99f292479f1253c4cb1845461ae9edec8f155133 (patch)
tree0bec446395b32bb8d55f5e16ede3a40f82700047 /source3/torture/torture.c
parent41a5149981eb7293a54f0497c3a4f4fc50661157 (diff)
downloadsamba-99f292479f1253c4cb1845461ae9edec8f155133.tar.gz
samba-99f292479f1253c4cb1845461ae9edec8f155133.tar.xz
samba-99f292479f1253c4cb1845461ae9edec8f155133.zip
s3: Convert cli_tdis to the async API
Diffstat (limited to 'source3/torture/torture.c')
-rw-r--r--source3/torture/torture.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 5a0a3000920..4dd595dbe62 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -364,8 +364,11 @@ bool torture_cli_session_setup2(struct cli_state *cli, uint16 *new_vuid)
bool torture_close_connection(struct cli_state *c)
{
bool ret = True;
- if (!cli_tdis(c)) {
- printf("tdis failed (%s)\n", cli_errstr(c));
+ NTSTATUS status;
+
+ status = cli_tdis(c);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("tdis failed (%s)\n", nt_errstr(status));
ret = False;
}
@@ -1192,8 +1195,9 @@ static bool run_tcon_test(int dummy)
cli->cnum = cnum2;
- if (!cli_tdis(cli)) {
- printf("secondary tdis failed (%s)\n", cli_errstr(cli));
+ status = cli_tdis(cli);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("secondary tdis failed (%s)\n", nt_errstr(status));
return False;
}
@@ -6078,17 +6082,20 @@ static bool run_uid_regression_test(int dummy)
cli->vuid = 0;
/* This should succeed. */
- if (cli_tdis(cli)) {
+ status = cli_tdis(cli);
+
+ if (NT_STATUS_IS_OK(status)) {
printf("First tdis with invalid vuid should succeed.\n");
} else {
- printf("First tdis failed (%s)\n", cli_errstr(cli));
+ printf("First tdis failed (%s)\n", nt_errstr(status));
}
cli->vuid = old_vuid;
cli->cnum = old_cnum;
/* This should fail. */
- if (cli_tdis(cli)) {
+ status = cli_tdis(cli);
+ if (NT_STATUS_IS_OK(status)) {
printf("Second tdis with invalid vuid should fail - succeeded instead !.\n");
} else {
/* Should be bad tid. */