*/
#include "includes.h"
+#include "../lib/util/tevent_ntstatus.h"
+#include "async_smb.h"
/****************************************************************************
send an ack for an oplock break request
struct tevent_req *req, *subreq;
struct cli_oplock_ack_state *state;
- req = tevent_req_create(mem_ctx, &state, struct cli_oplock_ack_state);;
+ req = tevent_req_create(mem_ctx, &state, struct cli_oplock_ack_state);
if (req == NULL) {
return NULL;
}
subreq, struct tevent_req);
NTSTATUS status;
- status = cli_smb_recv(subreq, 0, NULL, NULL, NULL, NULL);
+ status = cli_smb_recv(subreq, NULL, NULL, 0, NULL, NULL, NULL, NULL);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
tevent_req_nterror(req, status);
return tevent_req_simple_recv_ntstatus(req);
}
-bool cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level)
+NTSTATUS cli_oplock_ack(struct cli_state *cli, uint16_t fnum, unsigned char level)
{
TALLOC_CTX *frame = talloc_stackframe();
struct event_context *ev;
if (!NT_STATUS_IS_OK(status)) {
cli_set_error(cli, status);
}
- return NT_STATUS_IS_OK(status);
+ return status;
}
/****************************************************************************
set the oplock handler for a connection
****************************************************************************/
+
void cli_oplock_handler(struct cli_state *cli,
- bool (*handler)(struct cli_state *, int, unsigned char))
+ NTSTATUS (*handler)(struct cli_state *, uint16_t, unsigned char))
{
cli->oplock_handler = handler;
}