summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-04-01 00:54:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:26 -0500
commit1da65dc29eefab5a011458d125a9d0597df29848 (patch)
tree914c021000fd8294672cceb795aeab34fa4fa25f /source3
parent89fffb349f19708ab23d5fd11fb004ee2ba1fe29 (diff)
downloadsamba-1da65dc29eefab5a011458d125a9d0597df29848.tar.gz
samba-1da65dc29eefab5a011458d125a9d0597df29848.tar.bz2
samba-1da65dc29eefab5a011458d125a9d0597df29848.zip
r6163: Well I never, all this time the t2open code was incorrectly decting
oplock requests and no one noticed. Hmmm. Don't think this is a commonly used codepath :-). Jeremy. (This used to be commit 75a0c11de4b7baf693e5c62e690e4bb26554f8e2)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/trans2.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index a68b165cb0..e53b47c1f4 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -744,7 +744,11 @@ static int call_trans2open(connection_struct *conn, char *inbuf, char *outbuf, i
open_mode = SVAL(params, 2);
open_attr = SVAL(params,6);
- oplock_request = (((SVAL(params,0)|(1<<1))>>1) | ((SVAL(params,0)|(1<<2))>>1));
+ oplock_request = (SVAL(params,0) & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0;
+ if (oplock_request) {
+ oplock_request |= (SVAL(params,0) & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0;
+ }
+
#if 0
return_additional_info = BITSETW(params,0);
open_sattr = SVAL(params, 4);