1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00

r17254: Simple flattening of an if-statement, no logic change.

Jeremy, I'm sure you will look at this nevertheless :-)

Volker
This commit is contained in:
Volker Lendecke 2006-07-26 08:08:48 +00:00 committed by Gerald (Jerry) Carter
parent f326bae3e2
commit 3ef34468b5

View File

@ -625,6 +625,8 @@ static BOOL delay_for_oplocks(struct share_mode_lock *lck,
BOOL valid_entry = False;
BOOL delay_it = False;
BOOL have_level2 = False;
BOOL ret;
char msg[MSG_SMB_SHARE_MODE_ENTRY_SIZE];
if (oplock_request & INTERNAL_OPEN_ONLY) {
fsp->oplock_type = NO_OPLOCK;
@ -688,9 +690,14 @@ static BOOL delay_for_oplocks(struct share_mode_lock *lck,
fsp->oplock_type = FAKE_LEVEL_II_OPLOCK;
}
if (delay_it) {
BOOL ret;
char msg[MSG_SMB_SHARE_MODE_ENTRY_SIZE];
if (!delay_it) {
return False;
}
/*
* Send a break message to the oplock holder and delay the open for
* our client.
*/
DEBUG(10, ("Sending break request to PID %s\n",
procid_str_static(&exclusive->pid)));
@ -699,8 +706,8 @@ static BOOL delay_for_oplocks(struct share_mode_lock *lck,
/* Create the message. */
share_mode_entry_to_message(msg, exclusive);
/* Add in the FORCE_OPLOCK_BREAK_TO_NONE bit in the message if set. We don't
want this set in the share mode struct pointed to by lck. */
/* Add in the FORCE_OPLOCK_BREAK_TO_NONE bit in the message if set. We
don't want this set in the share mode struct pointed to by lck. */
if (oplock_request & FORCE_OPLOCK_BREAK_TO_NONE) {
SSVAL(msg,6,exclusive->op_type | FORCE_OPLOCK_BREAK_TO_NONE);
@ -713,9 +720,8 @@ static BOOL delay_for_oplocks(struct share_mode_lock *lck,
if (!ret) {
DEBUG(3, ("Could not send oplock break message\n"));
}
}
return delay_it;
return True;
}
static BOOL request_timed_out(struct timeval request_time,