s3:libsmb: remove unused cli_oplock_handler()
authorStefan Metzmacher <metze@samba.org>
Tue, 12 Jul 2011 07:20:02 +0000 (09:20 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 12 Jul 2011 08:53:52 +0000 (10:53 +0200)
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jul 12 10:53:52 CEST 2011 on sn-devel-104

source3/include/client.h
source3/libsmb/clientgen.c
source3/libsmb/clioplock.c
source3/libsmb/proto.h

index b5b9bfc53e60dc77c074d7bf93373c74b5d832ae..dfd457b8913acf3527f28dc1e1b51ce4961108b7 100644 (file)
@@ -124,9 +124,6 @@ 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 */
-       NTSTATUS (*oplock_handler)(struct cli_state *cli, uint16_t fnum, unsigned char level);
-
        bool force_dos_errors;
        bool case_sensitive; /* False by default. */
 
index bcb1215579e11e478bbe2e3fcd4948f63e233003..d6c7d64733ddb399532a77ca91cc661279eeb8e1 100644 (file)
@@ -191,7 +191,6 @@ struct cli_state *cli_initialise_ex(int signing_state)
        cli->protocol = PROTOCOL_NT1;
        cli->timeout = 20000; /* Timeout is in milliseconds. */
        cli->max_xmit = CLI_BUFFER_SIZE+4;
-       cli->oplock_handler = cli_oplock_ack;
        cli->case_sensitive = false;
 
        cli->use_spnego = lp_client_use_spnego();
index da55f971a80c534ead187bf7254747d7ef0e5d51..f164ed522196649a11c43027fc89c3dc663d5dba 100644 (file)
@@ -83,50 +83,3 @@ NTSTATUS cli_oplock_ack_recv(struct tevent_req *req)
        return tevent_req_simple_recv_ntstatus(req);
 }
 
-NTSTATUS cli_oplock_ack(struct cli_state *cli, uint16_t fnum, unsigned char level)
-{
-       TALLOC_CTX *frame = talloc_stackframe();
-       struct event_context *ev;
-       struct tevent_req *req;
-       NTSTATUS status = NT_STATUS_OK;
-
-       if (cli_has_async_calls(cli)) {
-               /*
-                * Can't use sync call while an async call is in flight
-                */
-               status = NT_STATUS_INVALID_PARAMETER;
-               goto fail;
-       }
-
-       ev = event_context_init(frame);
-       if (ev == NULL) {
-               status = NT_STATUS_NO_MEMORY;
-               goto fail;
-       }
-
-       req = cli_oplock_ack_send(frame, ev, cli, fnum, level);
-       if (req == NULL) {
-               status = NT_STATUS_NO_MEMORY;
-               goto fail;
-       }
-
-       if (!tevent_req_poll(req, ev)) {
-               status = map_nt_error_from_unix(errno);
-               goto fail;
-       }
-
-       status = cli_oplock_ack_recv(req);
- fail:
-       TALLOC_FREE(frame);
-       return status;
-}
-
-/****************************************************************************
-set the oplock handler for a connection
-****************************************************************************/
-
-void cli_oplock_handler(struct cli_state *cli, 
-                       NTSTATUS (*handler)(struct cli_state *, uint16_t, unsigned char))
-{
-       cli->oplock_handler = handler;
-}
index 66ab6e6b15711f0bf354d87db816c7209472d3e2..0029db13e27652f8e93108ec8f076c2fd9f6cb43 100644 (file)
@@ -687,9 +687,6 @@ struct tevent_req *cli_oplock_ack_send(TALLOC_CTX *mem_ctx,
                                       struct cli_state *cli,
                                       uint16_t fnum, uint8_t level);
 NTSTATUS cli_oplock_ack_recv(struct tevent_req *req);
-NTSTATUS cli_oplock_ack(struct cli_state *cli, uint16_t fnum, unsigned char level);
-void cli_oplock_handler(struct cli_state *cli,
-                       NTSTATUS (*handler)(struct cli_state *, uint16_t, unsigned char));
 
 /* The following definitions come from libsmb/cliprint.c  */