summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/libcli/raw/clioplock.c3
-rw-r--r--source4/libcli/raw/rawrequest.c2
-rw-r--r--source4/smb_server/smb_server.c3
-rw-r--r--source4/torture/gentest.c2
-rw-r--r--source4/torture/raw/oplock.c2
5 files changed, 7 insertions, 5 deletions
diff --git a/source4/libcli/raw/clioplock.c b/source4/libcli/raw/clioplock.c
index 8f69716bda..f27bf937ce 100644
--- a/source4/libcli/raw/clioplock.c
+++ b/source4/libcli/raw/clioplock.c
@@ -33,7 +33,8 @@ BOOL cli_oplock_ack(struct cli_tree *tree, uint16 fnum, uint16 ack_level)
SSVAL(req->out.vwv,VWV(0),0xFF);
SSVAL(req->out.vwv,VWV(1),0);
SSVAL(req->out.vwv,VWV(2),fnum);
- SSVAL(req->out.vwv,VWV(3),ack_level);
+ SCVAL(req->out.vwv,VWV(3),LOCKING_ANDX_OPLOCK_RELEASE);
+ SCVAL(req->out.vwv,VWV(3)+1,ack_level);
SIVAL(req->out.vwv,VWV(4),0);
SSVAL(req->out.vwv,VWV(6),0);
SSVAL(req->out.vwv,VWV(7),0);
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c
index 2b84345abb..f03cc5cf16 100644
--- a/source4/libcli/raw/rawrequest.c
+++ b/source4/libcli/raw/rawrequest.c
@@ -340,7 +340,7 @@ static BOOL handle_oplock_break(struct cli_transport *transport, uint_t len, con
if (transport->oplock.handler) {
uint16 tid = SVAL(hdr, HDR_TID);
uint16 fnum = SVAL(vwv,VWV(2));
- uint8 level = CVAL(vwv,VWV(3));
+ uint8 level = CVAL(vwv,VWV(3)+1);
transport->oplock.handler(transport, tid, fnum, level, transport->oplock.private);
}
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index 8769a6f3f1..f798accc3f 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -44,7 +44,8 @@ BOOL req_send_oplock_break(struct tcon_context *conn, uint16 fnum, uint8 level)
SSVAL(req->out.vwv, VWV(0), SMB_CHAIN_NONE);
SSVAL(req->out.vwv, VWV(1), 0);
SSVAL(req->out.vwv, VWV(2), fnum);
- SSVAL(req->out.vwv, VWV(3), level);
+ SCVAL(req->out.vwv, VWV(3), LOCKING_ANDX_OPLOCK_RELEASE);
+ SCVAL(req->out.vwv, VWV(3)+1, level);
SIVAL(req->out.vwv, VWV(4), 0);
SSVAL(req->out.vwv, VWV(6), 0);
SSVAL(req->out.vwv, VWV(7), 0);
diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c
index 03a66487fa..32dd763b26 100644
--- a/source4/torture/gentest.c
+++ b/source4/torture/gentest.c
@@ -736,7 +736,7 @@ static BOOL oplock_handler(struct cli_transport *transport, uint16 tid, uint16 f
if (!do_close) {
printf("oplock ack fnum=%d\n", fnum);
- return cli_oplock_ack(tree, fnum, level == 1? 0x102 : 2);
+ return cli_oplock_ack(tree, fnum, level);
}
printf("oplock close fnum=%d\n", fnum);
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c
index dc8c883f76..0eabcc94f7 100644
--- a/source4/torture/raw/oplock.c
+++ b/source4/torture/raw/oplock.c
@@ -54,7 +54,7 @@ static BOOL oplock_handler_ack(struct cli_transport *transport, uint16 tid, uint
printf("Acking in oplock handler\n");
- return cli_oplock_ack(tree, fnum, level == 1? 0x102 : 2);
+ return cli_oplock_ack(tree, fnum, level);
}
/*