summaryrefslogtreecommitdiffstats
path: root/source/locking/brlock.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-07-27 17:23:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:23 -0500
commitafa6e9094604afe1ef929cd936fbfa07b5473fd2 (patch)
tree51a0541502221dab5ed4641e7b31300d38b4d21e /source/locking/brlock.c
parent42dec2192c1261090f2fac7a123c384f5c133587 (diff)
downloadsamba-afa6e9094604afe1ef929cd936fbfa07b5473fd2.tar.gz
samba-afa6e9094604afe1ef929cd936fbfa07b5473fd2.tar.xz
samba-afa6e9094604afe1ef929cd936fbfa07b5473fd2.zip
r17279: conn->cnum is the tid we've given to the client. This has nothing to do with
our internal share number. Funny that it worked at all :-) Volker
Diffstat (limited to 'source/locking/brlock.c')
-rw-r--r--source/locking/brlock.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/locking/brlock.c b/source/locking/brlock.c
index 5ce8a3730b2..031836ecdfa 100644
--- a/source/locking/brlock.c
+++ b/source/locking/brlock.c
@@ -792,7 +792,7 @@ static BOOL brl_unlock_windows(struct byte_range_lock *br_lck, const struct lock
br_lck->modified = True;
/* Unlock the underlying POSIX regions. */
- if(lp_posix_locking(br_lck->fsp->conn->cnum)) {
+ if(lp_posix_locking(SNUM(br_lck->fsp->conn))) {
release_posix_lock_windows_flavour(br_lck->fsp,
plock->start,
plock->size,
@@ -943,7 +943,7 @@ static BOOL brl_unlock_posix(struct byte_range_lock *br_lck, const struct lock_s
}
/* Unlock any POSIX regions. */
- if(lp_posix_locking(br_lck->fsp->conn->cnum)) {
+ if(lp_posix_locking(SNUM(br_lck->fsp->conn))) {
release_posix_lock_posix_flavour(br_lck->fsp,
plock->start,
plock->size,
@@ -1069,7 +1069,7 @@ BOOL brl_locktest(struct byte_range_lock *br_lck,
* This only conflicts with Windows locks, not POSIX locks.
*/
- if(lp_posix_locking(fsp->conn->cnum) && (lock_flav == WINDOWS_LOCK)) {
+ if(lp_posix_locking(SNUM(fsp->conn)) && (lock_flav == WINDOWS_LOCK)) {
ret = is_posix_locked(fsp, &start, &size, &lock_type, WINDOWS_LOCK);
DEBUG(10,("brl_locktest: posix start=%.0f len=%.0f %s for fnum %d file %s\n",
@@ -1135,7 +1135,7 @@ NTSTATUS brl_lockquery(struct byte_range_lock *br_lck,
* see if there is a POSIX lock from a UNIX or NFS process.
*/
- if(lp_posix_locking(fsp->conn->cnum)) {
+ if(lp_posix_locking(SNUM(fsp->conn))) {
BOOL ret = is_posix_locked(fsp, pstart, psize, plock_type, POSIX_LOCK);
DEBUG(10,("brl_lockquery: posix start=%.0f len=%.0f %s for fnum %d file %s\n",
@@ -1218,7 +1218,7 @@ void brl_close_fnum(struct byte_range_lock *br_lck)
struct process_id pid = procid_self();
BOOL unlock_individually = False;
- if(lp_posix_locking(fsp->conn->cnum)) {
+ if(lp_posix_locking(SNUM(fsp->conn))) {
/* Check if there are any Windows locks associated with this dev/ino
pair that are not this fnum. If so we need to call unlock on each
@@ -1326,7 +1326,7 @@ void brl_close_fnum(struct byte_range_lock *br_lck)
}
}
- if(lp_posix_locking(fsp->conn->cnum) && num_deleted_windows_locks) {
+ if(lp_posix_locking(SNUM(fsp->conn)) && num_deleted_windows_locks) {
/* Reduce the Windows lock POSIX reference count on this dev/ino pair. */
reduce_windows_lock_ref_count(fsp, num_deleted_windows_locks);
}