summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-05-19 20:57:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:22:15 -0500
commit01a7017d7b0e0cbc3b0923c43b7fe3f0b01aac0b (patch)
tree461916086f30ca61c6bed9c439a8d96808bd3d8b /source3/smbd/trans2.c
parentfa4df182e5777f534edd327446f5b1d1e79c6133 (diff)
downloadsamba-01a7017d7b0e0cbc3b0923c43b7fe3f0b01aac0b.tar.gz
samba-01a7017d7b0e0cbc3b0923c43b7fe3f0b01aac0b.tar.bz2
samba-01a7017d7b0e0cbc3b0923c43b7fe3f0b01aac0b.zip
r23014: For all branches, ensure that if we're blocked on a POSIX
lock we know nothing about that we retry the lock every 10 seconds instead of waiting for the standard select timeout. This is how we used to (and are supposed to) work. Jeremy. (This used to be commit fa18fc25a50cf13c687ae88e7e5e2dda1120e017)
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 0730041899..63fd414e16 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -4815,6 +4815,8 @@ static NTSTATUS smb_set_posix_lock(connection_struct *conn,
offset,
POSIX_LOCK);
} else {
+ uint32 block_smbpid;
+
struct byte_range_lock *br_lck = do_lock(smbd_messaging_context(),
fsp,
lock_pid,
@@ -4823,7 +4825,8 @@ static NTSTATUS smb_set_posix_lock(connection_struct *conn,
lock_type,
POSIX_LOCK,
blocking_lock,
- &status);
+ &status,
+ &block_smbpid);
if (br_lck && blocking_lock && ERROR_WAS_LOCK_DENIED(status)) {
/*
@@ -4840,7 +4843,8 @@ static NTSTATUS smb_set_posix_lock(connection_struct *conn,
lock_type,
POSIX_LOCK,
offset,
- count)) {
+ count,
+ block_smbpid)) {
TALLOC_FREE(br_lck);
return status;
}