diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-06-18 08:26:15 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-06-18 08:26:15 +0000 |
commit | e324e21457b232acb13a06fa5a4b8f363b3dec7c (patch) | |
tree | 33deb696bc796fe963c19505943d127430eee6a1 /source3/include | |
parent | 7b01c627c62ef6be519110fcd6cb88c86c5cd0ab (diff) | |
download | samba-e324e21457b232acb13a06fa5a4b8f363b3dec7c.tar.gz samba-e324e21457b232acb13a06fa5a4b8f363b3dec7c.tar.bz2 samba-e324e21457b232acb13a06fa5a4b8f363b3dec7c.zip |
added a oplock break handler hook to the client code, this allows for more complete testing of oplocks from smbtorture and would also be essential if a client app ever really did want to use oplocks properly
(This used to be commit 3d4a3bfacd9ef225aeaab801e5a216d12814b60a)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/client.h | 3 | ||||
-rw-r--r-- | source3/include/proto.h | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/source3/include/client.h b/source3/include/client.h index bdc2383f8e..ecd97c1433 100644 --- a/source3/include/client.h +++ b/source3/include/client.h @@ -132,6 +132,9 @@ struct cli_state { BOOL use_oplocks; /* should we use oplocks? */ BOOL use_level_II_oplocks; /* should we use level II oplocks? */ + + /* a oplock break request handler */ + BOOL (*oplock_handler)(struct cli_state *cli, int fnum, unsigned char level); }; #endif /* _CLIENT_H */ diff --git a/source3/include/proto.h b/source3/include/proto.h index b2f41e231f..3bc62add3e 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1097,6 +1097,12 @@ BOOL cli_message_start(struct cli_state *cli, char *host, char *username, BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); BOOL cli_message_end(struct cli_state *cli, int grp); +/* The following definitions come from libsmb/clioplock.c */ + +BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); +void cli_oplock_handler(struct cli_state *cli, + BOOL (*handler)(struct cli_state *, int, unsigned char)); + /* The following definitions come from libsmb/cliprint.c */ int cli_print_queue(struct cli_state *cli, |