diff options
author | Jeremy Allison <jra@samba.org> | 2006-07-18 01:20:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:12 -0500 |
commit | 98d8d9399bb287319578daaf2a2fb42f3c48f858 (patch) | |
tree | 5322791c9534843dda5bc57122e6674a6569672b | |
parent | b5aaff665937313370e0e87225e146f9af7b7e67 (diff) | |
download | samba-98d8d9399bb287319578daaf2a2fb42f3c48f858.tar.gz samba-98d8d9399bb287319578daaf2a2fb42f3c48f858.tar.xz samba-98d8d9399bb287319578daaf2a2fb42f3c48f858.zip |
r17107: Make the 200 ms timeout value tunable in local.h...
Might need to be a parameter ?
Jeremy.
-rw-r--r-- | source/include/local.h | 3 | ||||
-rw-r--r-- | source/smbd/reply.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/source/include/local.h b/source/include/local.h index fb931976362..6d32f4fe6e9 100644 --- a/source/include/local.h +++ b/source/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/source/smbd/reply.c b/source/smbd/reply.c index bb799186753..f1ac098e7d1 100644 --- a/source/smbd/reply.c +++ b/source/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) { |