summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorBjörn Baumbach <bb@sernet.de>2011-07-22 12:29:59 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-23 09:18:25 +0200
commit6d695749c741cf021ed8df1fa40f6fd8a25cf4a1 (patch)
tree1bdec022e127deaccb2127f43005b8787b40e5b1 /source3/torture
parent963aa9856c9214815cbe6841db0e83d9d5f000eb (diff)
downloadsamba-6d695749c741cf021ed8df1fa40f6fd8a25cf4a1.tar.gz
samba-6d695749c741cf021ed8df1fa40f6fd8a25cf4a1.tar.bz2
samba-6d695749c741cf021ed8df1fa40f6fd8a25cf4a1.zip
s3-torture: run_oplock2(): replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/torture.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index c135ed7c35..36d263d05e 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -3525,6 +3525,7 @@ static bool run_oplock2(int dummy)
char buf[4];
bool correct = True;
volatile bool *shared_correct;
+ size_t nread;
NTSTATUS status;
shared_correct = (volatile bool *)shm_setup(sizeof(bool));
@@ -3593,10 +3594,14 @@ static bool run_oplock2(int dummy)
/* Ensure cli1 processes the break. Empty file should always return 0
* bytes. */
-
- if (cli_read_old(cli1, fnum1, buf, 0, 4) != 0) {
- printf("read on fnum1 failed (%s)\n", cli_errstr(cli1));
- correct = False;
+ status = cli_read(cli1, fnum1, buf, 0, 4, &nread);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("read on fnum1 failed (%s)\n", nt_errstr(status));
+ correct = false;
+ } else if (nread != 0) {
+ printf("read on empty fnum1 failed. recv %ld expected %d\n",
+ (unsigned long)nread, 0);
+ correct = false;
}
/* Should now be at level II. */
@@ -3621,7 +3626,7 @@ static bool run_oplock2(int dummy)
sleep(2);
- cli_read_old(cli1, fnum1, buf, 0, 4);
+ cli_read(cli1, fnum1, buf, 0, 4, NULL);
status = cli_close(cli1, fnum1);
if (!NT_STATUS_IS_OK(status)) {