summaryrefslogtreecommitdiffstats
path: root/source/smbd/nttrans.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@sernet.de>2007-12-01 14:52:25 +0100
committerVolker Lendecke <vl@sernet.de>2007-12-05 13:45:11 +0100
commita855808f4851a800055bfee5df39ca72057e55f9 (patch)
treed3a643b967388c9ca0a119b88ca3e9afb89cf6f0 /source/smbd/nttrans.c
parent481e35eba8e130041848887ec5fb6212e331eb14 (diff)
downloadsamba-a855808f4851a800055bfee5df39ca72057e55f9.tar.gz
samba-a855808f4851a800055bfee5df39ca72057e55f9.tar.xz
samba-a855808f4851a800055bfee5df39ca72057e55f9.zip
Tiny refactoring
Reformatting, consolidate oplock calculation to the same place in both routines
Diffstat (limited to 'source/smbd/nttrans.c')
-rw-r--r--source/smbd/nttrans.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c
index 68eb9f09856..aaf4a408e6b 100644
--- a/source/smbd/nttrans.c
+++ b/source/smbd/nttrans.c
@@ -704,6 +704,12 @@ void reply_ntcreate_and_X(connection_struct *conn,
}
}
+ oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0;
+ if (oplock_request) {
+ oplock_request |= (flags & REQUEST_BATCH_OPLOCK)
+ ? BATCH_OPLOCK : 0;
+ }
+
/*
* Now contruct the smb_open_mode value from the filename,
* desired access and the share access.
@@ -724,11 +730,6 @@ void reply_ntcreate_and_X(connection_struct *conn,
return;
}
- oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0;
- if (oplock_request) {
- oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0;
- }
-
/*
* Ordinary file or directory.
*/
@@ -1458,7 +1459,8 @@ static void call_nt_transact_create(connection_struct *conn,
oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0;
if (oplock_request) {
- oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0;
+ oplock_request |= (flags & REQUEST_BATCH_OPLOCK)
+ ? BATCH_OPLOCK : 0;
}
/*