summaryrefslogtreecommitdiff
path: root/source3/libsmb/clioplock.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-04-30 15:26:43 -0700
committerJeremy Allison <jra@samba.org>2009-04-30 15:26:43 -0700
commit8cf78ff55312768d0b454b1d7e0560e04e6296da (patch)
tree0a2180f063e3bb9872c2565c92075dfb5dccac81 /source3/libsmb/clioplock.c
parentab4b8c9c0438bc5afca17e3ebf05dde6f98bc0aa (diff)
downloadsamba-8cf78ff55312768d0b454b1d7e0560e04e6296da.tar.gz
samba-8cf78ff55312768d0b454b1d7e0560e04e6296da.tar.bz2
samba-8cf78ff55312768d0b454b1d7e0560e04e6296da.zip
Get medieval on our ass about SMB1 file descriptors being 16 bits, not an int.
Convert all uses of cli_open(), cli_nt_createXXX to NTSTATUS versions. This is smaller than it looks, it just fixes a lot of old code. Next up, ensure all cli_XX functions return NTSTATUS. Jeremy.
Diffstat (limited to 'source3/libsmb/clioplock.c')
-rw-r--r--source3/libsmb/clioplock.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/libsmb/clioplock.c b/source3/libsmb/clioplock.c
index e3fb66aba0..7350c4aaa3 100644
--- a/source3/libsmb/clioplock.c
+++ b/source3/libsmb/clioplock.c
@@ -80,7 +80,7 @@ NTSTATUS cli_oplock_ack_recv(struct tevent_req *req)
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;
@@ -118,14 +118,15 @@ bool cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level)
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;
}