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);
}
}
* 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);
* 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. */