From a796542a930dec93c2a747c4b015d8d650a081fd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 24 Apr 2010 00:29:41 -0700 Subject: Implement oplocks within SMB2. Plumb into the existing SMB1 oplock system. Seems to work but needs more tests (to be added). Jeremy. --- source3/smbd/smb2_server.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source3/smbd/smb2_server.c') diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index 04cace8a59..894042702b 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -49,7 +49,7 @@ static const char *smb2_names[] = { const char *smb2_opcode_name(uint16_t opcode) { - if (opcode >= 0x12) { + if (opcode > 0x12) { return "Bad SMB2 opcode"; } return smb2_names[opcode]; @@ -1427,7 +1427,6 @@ struct smbd_smb2_send_oplock_break_state { static void smbd_smb2_oplock_break_writev_done(struct tevent_req *subreq); NTSTATUS smbd_smb2_send_oplock_break(struct smbd_server_connection *sconn, - uint64_t file_id_persistent, uint64_t file_id_volatile, uint8_t oplock_level) { @@ -1468,7 +1467,7 @@ NTSTATUS smbd_smb2_send_oplock_break(struct smbd_server_connection *sconn, SCVAL(body, 0x02, oplock_level); SCVAL(body, 0x03, 0); /* reserved */ SIVAL(body, 0x04, 0); /* reserved */ - SBVAL(body, 0x08, file_id_persistent); + SBVAL(body, 0x08, 0); /* file_id_persistent */ SBVAL(body, 0x10, file_id_volatile); subreq = tstream_writev_queue_send(state, -- cgit