1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-12 04:23:49 +03:00

fixed the handling of level II oplocks in samba4, especially when

acting as a cifs redirectory (using the cifs backend)
This commit is contained in:
Andrew Tridgell
-
parent 82e50a1ce8
commit 06a8100e6a
5 changed files with 7 additions and 5 deletions

View File

@@ -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);

View File

@@ -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);
}