summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-07-18 01:20:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:12 -0500
commit38af904c314396091de1062ec19591326abddec6 (patch)
treeda1d4965e430dcde935f4aec38240b4955baa1a4 /source3
parenta456a3130925e946975620131f75b7c82e8a096b (diff)
downloadsamba-38af904c314396091de1062ec19591326abddec6.tar.gz
samba-38af904c314396091de1062ec19591326abddec6.tar.bz2
samba-38af904c314396091de1062ec19591326abddec6.zip
r17107: Make the 200 ms timeout value tunable in local.h...
Might need to be a parameter ? Jeremy. (This used to be commit 98d8d9399bb287319578daaf2a2fb42f3c48f858)
Diffstat (limited to 'source3')
-rw-r--r--source3/include/local.h3
-rw-r--r--source3/smbd/reply.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/source3/include/local.h b/source3/include/local.h
index fb93197636..6d32f4fe6e 100644
--- a/source3/include/local.h
+++ b/source3/include/local.h
@@ -247,4 +247,7 @@
/* Default hash size for the winbindd cache. */
#define WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE 5000
+/* Windows minimum lock resolution timeout in ms */
+#define WINDOWS_MINIMUM_LOCK_TIMEOUT_MS 200
+
#endif
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index bb79918675..f1ac098e7d 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -5383,8 +5383,8 @@ int reply_lockingX(connection_struct *conn, char *inbuf, char *outbuf,
if (br_lck && blocking_lock && ERROR_WAS_LOCK_DENIED(status)) {
/* Windows internal resolution for blocking locks seems
to be about 200ms... Don't wait for less than that. JRA. */
- if (lock_timeout != -1 && lock_timeout < 200) {
- lock_timeout = 200;
+ if (lock_timeout != -1 && lock_timeout < WINDOWS_MINIMUM_LOCK_TIMEOUT_MS) {
+ lock_timeout = WINDOWS_MINIMUM_LOCK_TIMEOUT_MS;
}
defer_lock = True;
}
@@ -5397,7 +5397,7 @@ int reply_lockingX(connection_struct *conn, char *inbuf, char *outbuf,
if (br_lck && lp_blocking_locks(SNUM(conn)) && !blocking_lock &&
NT_STATUS_EQUAL((status), NT_STATUS_FILE_LOCK_CONFLICT)) {
defer_lock = True;
- lock_timeout = 200;
+ lock_timeout = WINDOWS_MINIMUM_LOCK_TIMEOUT_MS;
}
if (br_lck && defer_lock) {