summaryrefslogtreecommitdiff
path: root/source3/smbd/blocking.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-08-27 17:52:23 +0000
committerAndrew Tridgell <tridge@samba.org>2001-08-27 17:52:23 +0000
commitee5f7237decfe446f4fdb08422beb2e6cb43af7f (patch)
tree80b217a2938d7e0d46a5d20517c9adb0807ecd1a /source3/smbd/blocking.c
parente8e98c9ea0690e3acf1126b50882e59e1056c7b3 (diff)
downloadsamba-ee5f7237decfe446f4fdb08422beb2e6cb43af7f.tar.gz
samba-ee5f7237decfe446f4fdb08422beb2e6cb43af7f.tar.bz2
samba-ee5f7237decfe446f4fdb08422beb2e6cb43af7f.zip
started converting NTSTATUS to be a structure on systems with gcc in order to make it type incompatible with BOOL so we catch errors sooner. This has already found a number of bugs
(This used to be commit 1b778bc7d22efff3f90dc450eb12baa1241cf68f)
Diffstat (limited to 'source3/smbd/blocking.c')
-rw-r--r--source3/smbd/blocking.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index 697e1df194..1365985660 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -276,7 +276,7 @@ static BOOL process_lockread(blocking_lock_record *blr)
status = do_lock( fsp, conn, SVAL(inbuf,smb_pid), (SMB_BIG_UINT)numtoread,
(SMB_BIG_UINT)startpos, READ_LOCK);
- if (status != NT_STATUS_NOPROBLEMO) {
+ if (NT_STATUS_V(status)) {
if ((errno != EACCES) && (errno != EAGAIN)) {
/*
* We have other than a "can't get lock" POSIX
@@ -342,7 +342,7 @@ static BOOL process_lock(blocking_lock_record *blr)
errno = 0;
status = do_lock(fsp, conn, SVAL(inbuf,smb_pid), (SMB_BIG_UINT)count,
(SMB_BIG_UINT)offset, WRITE_LOCK);
- if (status != NT_STATUS_NOPROBLEMO) {
+ if (NT_STATUS_IS_ERR(status)) {
if((errno != EACCES) && (errno != EAGAIN)) {
/*
* We have other than a "can't get lock" POSIX
@@ -391,7 +391,7 @@ static BOOL process_lockingX(blocking_lock_record *blr)
uint16 lock_pid;
BOOL large_file_format = (locktype & LOCKING_ANDX_LARGE_FILES);
char *data;
- NTSTATUS status = 0;
+ NTSTATUS status = NT_STATUS_OK;
data = smb_buf(inbuf) + ((large_file_format ? 20 : 10)*num_ulocks);
@@ -414,7 +414,7 @@ static BOOL process_lockingX(blocking_lock_record *blr)
errno = 0;
status = do_lock(fsp,conn,count,lock_pid,offset,
((locktype & 1) ? READ_LOCK : WRITE_LOCK));
- if (status != NT_STATUS_NOPROBLEMO) break;
+ if (NT_STATUS_IS_ERR(status)) break;
}
if(blr->lock_num == num_locks) {