Author: vlendec Date: 2006-07-27 17:23:57 +0000 (Thu, 27 Jul 2006) New Revision: 17279
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17279 Log: 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 Modified: branches/SAMBA_3_0/source/locking/brlock.c Changeset: Modified: branches/SAMBA_3_0/source/locking/brlock.c =================================================================== --- branches/SAMBA_3_0/source/locking/brlock.c 2006-07-27 16:44:59 UTC (rev 17278) +++ branches/SAMBA_3_0/source/locking/brlock.c 2006-07-27 17:23:57 UTC (rev 17279) @@ -792,7 +792,7 @@ 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 @@ } /* 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 @@ * 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 @@ * 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 @@ 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 @@ } } - 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); }