summaryrefslogtreecommitdiff
path: root/source3/smbd/blocking.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2002-08-17 15:27:10 +0000
committerJelmer Vernooij <jelmer@samba.org>2002-08-17 15:27:10 +0000
commit127e77e6e334fdc33086bffcbe00d340c0ba0097 (patch)
treee89eafc0372f7ef4e88903b202c79ecf74161c3e /source3/smbd/blocking.c
parent287d49bb5da3a0eece5501910aef30328f63e30a (diff)
downloadsamba-127e77e6e334fdc33086bffcbe00d340c0ba0097.tar.gz
samba-127e77e6e334fdc33086bffcbe00d340c0ba0097.tar.bz2
samba-127e77e6e334fdc33086bffcbe00d340c0ba0097.zip
Sync 3.0 branch with head
(This used to be commit 42615b945e2e48e53a21ea47f2e45407913a6a1e)
Diffstat (limited to 'source3/smbd/blocking.c')
-rw-r--r--source3/smbd/blocking.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index d4a53d9a6d..6623c6df64 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -282,9 +282,10 @@ static BOOL process_lockread(blocking_lock_record *blr)
status = do_lock_spin( fsp, conn, SVAL(inbuf,smb_pid), (SMB_BIG_UINT)numtoread,
(SMB_BIG_UINT)startpos, READ_LOCK);
if (NT_STATUS_V(status)) {
- if ((errno != EACCES) && (errno != EAGAIN)) {
+ if (!NT_STATUS_EQUAL(status,NT_STATUS_LOCK_NOT_GRANTED) &&
+ !NT_STATUS_EQUAL(status,NT_STATUS_FILE_LOCK_CONFLICT)) {
/*
- * We have other than a "can't get lock" POSIX
+ * We have other than a "can't get lock"
* error. Send an error.
* Return True so we get dequeued.
*/
@@ -348,9 +349,10 @@ static BOOL process_lock(blocking_lock_record *blr)
status = do_lock_spin(fsp, conn, SVAL(inbuf,smb_pid), (SMB_BIG_UINT)count,
(SMB_BIG_UINT)offset, WRITE_LOCK);
if (NT_STATUS_IS_ERR(status)) {
- if((errno != EACCES) && (errno != EAGAIN)) {
+ if (!NT_STATUS_EQUAL(status,NT_STATUS_LOCK_NOT_GRANTED) &&
+ !NT_STATUS_EQUAL(status,NT_STATUS_FILE_LOCK_CONFLICT)) {
/*
- * We have other than a "can't get lock" POSIX
+ * We have other than a "can't get lock"
* error. Send an error.
* Return True so we get dequeued.
*/
@@ -432,12 +434,13 @@ static BOOL process_lockingX(blocking_lock_record *blr)
reply_lockingX_success(blr);
return True;
- } else if ((errno != EACCES) && (errno != EAGAIN)) {
- /*
- * We have other than a "can't get lock" POSIX
- * error. Free any locks we had and return an error.
- * Return True so we get dequeued.
- */
+ } else if (!NT_STATUS_EQUAL(status,NT_STATUS_LOCK_NOT_GRANTED) &&
+ !NT_STATUS_EQUAL(status,NT_STATUS_FILE_LOCK_CONFLICT)) {
+ /*
+ * We have other than a "can't get lock"
+ * error. Free any locks we had and return an error.
+ * Return True so we get dequeued.
+ */
blocking_lock_reply_error(blr, status);
return True;