summaryrefslogtreecommitdiff
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
commit96a1fb4b5da12666ac3164e65b76051dcbd77512 (patch)
treef914ae7392b0deca6f1afb7f054b80885e002cda
parentacaea7ece8b56db47885fb5263e46bee17f83051 (diff)
downloadsamba-96a1fb4b5da12666ac3164e65b76051dcbd77512.tar.gz
samba-96a1fb4b5da12666ac3164e65b76051dcbd77512.tar.bz2
samba-96a1fb4b5da12666ac3164e65b76051dcbd77512.zip
Tiny refactoring
Reformatting, consolidate oplock calculation to the same place in both routines (This used to be commit a855808f4851a800055bfee5df39ca72057e55f9)
-rw-r--r--source3/smbd/nttrans.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 68eb9f0985..aaf4a408e6 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/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;
}
/*