mirror of
https://github.com/samba-team/samba.git
synced 2025-03-08 04:58:40 +03:00
r8521: Another micro-step: Don't pass down a flag where not necessary.
Volker (This used to be commit 5f51b72ec7abea3588f76d22a8daa434cdf90eb0)
This commit is contained in:
parent
f5bf5765af
commit
3c6e5f6d47
@ -526,24 +526,22 @@ static void prepare_break_message(char *outbuf, files_struct *fsp, BOOL level2)
|
||||
Function to do the waiting before sending a local break.
|
||||
****************************************************************************/
|
||||
|
||||
static void wait_before_sending_break(BOOL local_request)
|
||||
static void wait_before_sending_break(void)
|
||||
{
|
||||
if(local_request) {
|
||||
struct timeval cur_tv;
|
||||
long wait_left = (long)lp_oplock_break_wait_time();
|
||||
struct timeval cur_tv;
|
||||
long wait_left = (long)lp_oplock_break_wait_time();
|
||||
|
||||
if (wait_left == 0)
|
||||
return;
|
||||
if (wait_left == 0)
|
||||
return;
|
||||
|
||||
GetTimeOfDay(&cur_tv);
|
||||
GetTimeOfDay(&cur_tv);
|
||||
|
||||
wait_left -= ((cur_tv.tv_sec - smb_last_time.tv_sec)*1000) +
|
||||
wait_left -= ((cur_tv.tv_sec - smb_last_time.tv_sec)*1000) +
|
||||
((cur_tv.tv_usec - smb_last_time.tv_usec)/1000);
|
||||
|
||||
if(wait_left > 0) {
|
||||
wait_left = MIN(wait_left, 1000);
|
||||
sys_usleep(wait_left * 1000);
|
||||
}
|
||||
if(wait_left > 0) {
|
||||
wait_left = MIN(wait_left, 1000);
|
||||
sys_usleep(wait_left * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@ -633,7 +631,9 @@ static BOOL oplock_break_level2(files_struct *fsp, BOOL local_request)
|
||||
* and has reported to cause problems on NT. JRA.
|
||||
*/
|
||||
|
||||
wait_before_sending_break(local_request);
|
||||
if (local_request) {
|
||||
wait_before_sending_break();
|
||||
}
|
||||
|
||||
/* Prepare the SMBlockingX message. */
|
||||
prepare_break_message( outbuf, fsp, False);
|
||||
@ -770,7 +770,9 @@ static BOOL oplock_break(SMB_DEV_T dev, SMB_INO_T inode, unsigned long file_id,
|
||||
* and has reported to cause problems on NT. JRA.
|
||||
*/
|
||||
|
||||
wait_before_sending_break(local_request);
|
||||
if (local_request) {
|
||||
wait_before_sending_break();
|
||||
}
|
||||
|
||||
/* Prepare the SMBlockingX message. */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user