summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-01-26 08:37:13 +0100
committerVolker Lendecke <vl@samba.org>2009-01-30 12:47:59 +0100
commit0bd92281e49b91a9b9a14486adbe6f44affb7a13 (patch)
tree52d898f315e99320f8e186bf37d9f9e37e28b38f /source3/torture
parent7b934c6af3f80c9d75151906eed929045cec28a2 (diff)
downloadsamba-0bd92281e49b91a9b9a14486adbe6f44affb7a13.tar.gz
samba-0bd92281e49b91a9b9a14486adbe6f44affb7a13.tar.bz2
samba-0bd92281e49b91a9b9a14486adbe6f44affb7a13.zip
Make cli_tcon_andx async
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/locktest.c7
-rw-r--r--source3/torture/masktest.c7
-rw-r--r--source3/torture/torture.c20
3 files changed, 19 insertions, 15 deletions
diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c
index 1bff95f4f3..4e8dcdd09a 100644
--- a/source3/torture/locktest.c
+++ b/source3/torture/locktest.c
@@ -257,9 +257,10 @@ static struct cli_state *connect_one(char *share, int snum)
DEBUG(4,(" session setup ok\n"));
- if (!cli_send_tconX(c, share, "?????",
- password[snum], strlen(password[snum])+1)) {
- DEBUG(0,("tree connect failed: %s\n", cli_errstr(c)));
+ status = cli_tcon_andx(c, share, "?????", password[snum],
+ strlen(password[snum])+1);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0,("tree connect failed: %s\n", nt_errstr(status)));
cli_shutdown(c);
return NULL;
}
diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c
index 2c3bda1d43..fb562c8075 100644
--- a/source3/torture/masktest.c
+++ b/source3/torture/masktest.c
@@ -249,9 +249,10 @@ static struct cli_state *connect_one(char *share)
DEBUG(4,(" session setup ok\n"));
- if (!cli_send_tconX(c, share, "?????",
- password, strlen(password)+1)) {
- DEBUG(0,("tree connect failed: %s\n", cli_errstr(c)));
+ status = cli_tcon_andx(c, share, "?????", password,
+ strlen(password)+1);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0,("tree connect failed: %s\n", nt_errstr(status)));
cli_shutdown(c);
return NULL;
}
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 85233bc0ae..1210a36a39 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -1101,6 +1101,7 @@ static bool run_tcon_test(int dummy)
uint16 vuid1, vuid2;
char buf[4];
bool ret = True;
+ NTSTATUS status;
memset(buf, '\0', sizeof(buf));
@@ -1127,10 +1128,11 @@ static bool run_tcon_test(int dummy)
return False;
}
- if (!cli_send_tconX(cli, share, "?????",
- password, strlen(password)+1)) {
+ status = cli_tcon_andx(cli, share, "?????",
+ password, strlen(password)+1);
+ if (!NT_STATUS_IS_OK(status)) {
printf("%s refused 2nd tree connect (%s)\n", host,
- cli_errstr(cli));
+ nt_errstr(status));
cli_shutdown(cli);
return False;
}
@@ -1239,14 +1241,14 @@ static bool tcon_devtest(struct cli_state *cli,
const char *return_devtype,
NTSTATUS expected_error)
{
- bool status;
+ NTSTATUS status;
bool ret;
- status = cli_send_tconX(cli, myshare, devtype,
- password, strlen(password)+1);
+ status = cli_tcon_andx(cli, myshare, devtype,
+ password, strlen(password)+1);
if (NT_STATUS_IS_OK(expected_error)) {
- if (status) {
+ if (NT_STATUS_IS_OK(status)) {
if (strcmp(cli->dev, return_devtype) == 0) {
ret = True;
} else {
@@ -1264,7 +1266,7 @@ static bool tcon_devtest(struct cli_state *cli,
}
cli_tdis(cli);
} else {
- if (status) {
+ if (NT_STATUS_IS_OK(status)) {
printf("tconx to share %s with type %s "
"should have failed but succeeded\n",
myshare, devtype);
@@ -2157,7 +2159,7 @@ static bool run_fdsesstest(int dummy)
return False;
saved_cnum = cli->cnum;
- if (!cli_send_tconX(cli, share, "?????", "", 1))
+ if (!NT_STATUS_IS_OK(cli_tcon_andx(cli, share, "?????", "", 1)))
return False;
new_cnum = cli->cnum;
cli->cnum = saved_cnum;