svn commit: samba r8521 - branches/SAMBA_3_0/source/smbd
trunk/source/smbd
vlendec at samba.org
vlendec at samba.org
Sun Jul 17 09:56:25 GMT 2005
Author: vlendec
Date: 2005-07-17 09:56:25 +0000 (Sun, 17 Jul 2005)
New Revision: 8521
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8521
Log:
Another micro-step: Don't pass down a flag where not necessary.
Volker
Modified:
branches/SAMBA_3_0/source/smbd/oplock.c
trunk/source/smbd/oplock.c
Changeset:
Modified: branches/SAMBA_3_0/source/smbd/oplock.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/oplock.c 2005-07-17 09:20:52 UTC (rev 8520)
+++ branches/SAMBA_3_0/source/smbd/oplock.c 2005-07-17 09:56:25 UTC (rev 8521)
@@ -526,24 +526,22 @@
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 @@
* 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 @@
* 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. */
Modified: trunk/source/smbd/oplock.c
===================================================================
--- trunk/source/smbd/oplock.c 2005-07-17 09:20:52 UTC (rev 8520)
+++ trunk/source/smbd/oplock.c 2005-07-17 09:56:25 UTC (rev 8521)
@@ -535,24 +535,22 @@
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);
}
}
@@ -642,7 +640,9 @@
* 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);
@@ -779,7 +779,9 @@
* 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. */
More information about the samba-cvs
mailing list