r15032: change BENCH-NBENCH to always break to none, rather than accepting a
authorAndrew Tridgell <tridge@samba.org>
Tue, 11 Apr 2006 04:36:09 +0000 (04:36 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:04:02 +0000 (14:04 -0500)
levelII break offer from the server.
(This used to be commit 7d7853476e03262133093c69f1f93ee02cc87840)

source4/include/smb.h
source4/torture/nbench/nbio.c

index 94868903851099c08f28701b7015f856a4cc637f..04b3c5b63334293f48eb9fd0ea8260a83d63838e 100644 (file)
 #define BATCH_OPLOCK_RETURN 2
 #define LEVEL_II_OPLOCK_RETURN 3
 
+/* oplock levels sent in oplock break */
+#define OPLOCK_BREAK_TO_NONE     0
+#define OPLOCK_BREAK_TO_LEVEL_II 1
+
+
 #define CMD_REPLY 0x8000
 
 /* The maximum length of a trust account password.
index ce408bba93a6521ae429b2d858d3842f55969d5d..96d763651e8984f763c1b0d3da592d3bea569cc1 100644 (file)
@@ -181,10 +181,11 @@ static struct smbcli_state *c;
 /*
   a handler function for oplock break requests
 */
-static BOOL oplock_handler(struct smbcli_transport *transport, uint16_t tid, uint16_t fnum, uint8_t level, void *private)
+static BOOL oplock_handler(struct smbcli_transport *transport, uint16_t tid, 
+                          uint16_t fnum, BOOL shared, uint8_t level, void *private)
 {
        struct smbcli_tree *tree = private;
-       return smbcli_oplock_ack(tree, fnum, level);
+       return smbcli_oplock_ack(tree, fnum, OPLOCK_BREAK_TO_NONE);
 }
 
 void nb_setup(struct smbcli_state *cli, int id)