diff options
author | Jeremy Allison <jra@samba.org> | 2002-03-07 20:41:11 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-03-07 20:41:11 +0000 |
commit | 21b0905042c68ac8d46f7473323f94e74045a669 (patch) | |
tree | 21392ef2d671d075599fcd072f1da015ff80b5a2 /source/smbd/nttrans.c | |
parent | 6404a15eb2b48f4ce10e9c43986cfb3cada00b6d (diff) | |
download | samba-21b0905042c68ac8d46f7473323f94e74045a669.tar.gz samba-21b0905042c68ac8d46f7473323f94e74045a669.tar.xz samba-21b0905042c68ac8d46f7473323f94e74045a669.zip |
Merge from HEAD for return flags for oplocks.
Jeremy.
Diffstat (limited to 'source/smbd/nttrans.c')
-rw-r--r-- | source/smbd/nttrans.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index e406c259116..5cd0d391c4a 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -758,7 +758,9 @@ int reply_ntcreate_and_X(connection_struct *conn, } oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0; - oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0; + if (oplock_request) { + oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0; + } /* * Ordinary file or directory. @@ -926,12 +928,17 @@ int reply_ntcreate_and_X(connection_struct *conn, * exclusive & batch here. */ - if (smb_action & EXTENDED_OPLOCK_GRANTED) - SCVAL(p,0, BATCH_OPLOCK_RETURN); - else if (LEVEL_II_OPLOCK_TYPE(fsp->oplock_type)) + if (smb_action & EXTENDED_OPLOCK_GRANTED) { + if (flags & REQUEST_BATCH_OPLOCK) { + SCVAL(p,0, BATCH_OPLOCK_RETURN); + } else { + SCVAL(p,0, EXCLUSIVE_OPLOCK_RETURN); + } + } else if (LEVEL_II_OPLOCK_TYPE(fsp->oplock_type)) { SCVAL(p,0, LEVEL_II_OPLOCK_RETURN); - else + } else { SCVAL(p,0,NO_OPLOCK_RETURN); + } p++; SSVAL(p,0,fsp->fnum); |