From 96a1fb4b5da12666ac3164e65b76051dcbd77512 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 1 Dec 2007 14:52:25 +0100 Subject: Tiny refactoring Reformatting, consolidate oplock calculation to the same place in both routines (This used to be commit a855808f4851a800055bfee5df39ca72057e55f9) --- source3/smbd/nttrans.c | 14 ++++++++------ 1 file 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; } /* -- cgit