summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-01-30 00:35:58 +0000
committerJeremy Allison <jra@samba.org>2001-01-30 00:35:58 +0000
commitc229faef283106c1b10e92d6a458769cf48d3fb7 (patch)
tree1aab585d0034674feed2388ecba6f1357aba89e7
parent1a551be727575b9c2ba2e8186b5ec0ee351aed00 (diff)
downloadsamba-c229faef283106c1b10e92d6a458769cf48d3fb7.tar.gz
samba-c229faef283106c1b10e92d6a458769cf48d3fb7.tar.xz
samba-c229faef283106c1b10e92d6a458769cf48d3fb7.zip
Fix inspited by Alan Romeril. 50% speedup in domain logins with this
change to default break response time of 10ms -> 0ms. Jeremy.
-rw-r--r--source/include/version.h2
-rw-r--r--source/param/loadparm.c2
-rw-r--r--source/smbd/oplock.c3
3 files changed, 5 insertions, 2 deletions
diff --git a/source/include/version.h b/source/include/version.h
index 64c58d0a7ed..83b7b5bbbc0 100644
--- a/source/include/version.h
+++ b/source/include/version.h
@@ -1 +1 @@
-#define VERSION "2.2.0-alpha1"
+#define VERSION "2.2.0-alpha2"
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index f87d3a402f5..5a9cf0f2d54 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -1256,7 +1256,7 @@ static void init_globals(void)
Globals.bRestrictAnonymous = False;
Globals.map_to_guest = 0; /* By Default, "Never" */
Globals.min_passwd_length = MINPASSWDLENGTH; /* By Default, 5. */
- Globals.oplock_break_wait_time = 10; /* By Default, 10 msecs. */
+ Globals.oplock_break_wait_time = 0; /* By Default, 0 msecs. */
#ifdef WITH_LDAP
/* default values for ldap */
diff --git a/source/smbd/oplock.c b/source/smbd/oplock.c
index 366b4d0fec6..4f26eaf7f24 100644
--- a/source/smbd/oplock.c
+++ b/source/smbd/oplock.c
@@ -470,6 +470,9 @@ static void wait_before_sending_break(BOOL local_request)
struct timeval cur_tv;
long wait_left = (long)lp_oplock_break_wait_time();
+ if (wait_left == 0)
+ return;
+
GetTimeOfDay(&cur_tv);
wait_left -= ((cur_tv.tv_sec - smb_last_time.tv_sec)*1000) +