From 1da65dc29eefab5a011458d125a9d0597df29848 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 1 Apr 2005 00:54:55 +0000 Subject: 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) --- source3/smbd/trans2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source3') 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); -- cgit