From e324e21457b232acb13a06fa5a4b8f363b3dec7c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 18 Jun 2001 08:26:15 +0000 Subject: 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) --- source3/include/client.h | 3 +++ source3/include/proto.h | 6 ++++++ 2 files changed, 9 insertions(+) (limited to 'source3/include') 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, -- cgit