From 8a234cbe1589439497608d35f35768c6841750c9 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 12 Jul 2011 09:20:02 +0200 Subject: s3:libsmb: remove unused cli_oplock_handler() metze Autobuild-User: Stefan Metzmacher Autobuild-Date: Tue Jul 12 10:53:52 CEST 2011 on sn-devel-104 --- source3/libsmb/clioplock.c | 47 ---------------------------------------------- 1 file changed, 47 deletions(-) (limited to 'source3/libsmb/clioplock.c') diff --git a/source3/libsmb/clioplock.c b/source3/libsmb/clioplock.c index da55f971a8..f164ed5221 100644 --- a/source3/libsmb/clioplock.c +++ b/source3/libsmb/clioplock.c @@ -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; -} -- cgit