svn commit: samba r15027 - in trunk/source/locking: .

jra at samba.org jra at samba.org
Mon Apr 10 23:31:34 GMT 2006


Author: jra
Date: 2006-04-10 23:31:33 +0000 (Mon, 10 Apr 2006)
New Revision: 15027

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15027

Log:
Fix warning until POSIX locking finished.
Jeremy.

Modified:
   trunk/source/locking/brlock.c


Changeset:
Modified: trunk/source/locking/brlock.c
===================================================================
--- trunk/source/locking/brlock.c	2006-04-10 23:29:47 UTC (rev 15026)
+++ trunk/source/locking/brlock.c	2006-04-10 23:31:33 UTC (rev 15027)
@@ -601,7 +601,6 @@
 	unsigned int i, count;
 	struct lock_struct *locks = (struct lock_struct *)br_lck->lock_data;
 	struct lock_struct *tp;
-	files_struct *fsp = br_lck->fsp;
 	BOOL lock_was_added = False;
 
 	/* No zero-zero locks for POSIX. */
@@ -660,7 +659,12 @@
 	   lock type so it can cope with the difference between
 	   Windows "stacking" locks and POSIX "flat" ones. */
 
+#if 0
+	/* FIXME - this call doesn't work correctly yet for POSIX locks... */
+
 	if ((plock->lock_type != PENDING_LOCK) && lp_posix_locking(SNUM(fsp->conn))) {
+		files_struct *fsp = br_lck->fsp;
+
 		if (!set_posix_lock(fsp, plock->start, plock->size, plock->lock_type, POSIX_LOCK)) {
 			if (errno == EACCES || errno == EAGAIN) {
 				SAFE_FREE(tp);
@@ -671,6 +675,7 @@
 			}
 		}
 	}
+#endif
 
 	if (!lock_was_added) {
 		memcpy(&tp[count], plock, sizeof(struct lock_struct));
@@ -950,10 +955,14 @@
 		return True;
 	}
 
+#if 0
+	/* FIXME - this call doesn't work correctly yet for POSIX locks... */
+
 	/* Unlock any POSIX regions. */
 	if(lp_posix_locking(br_lck->fsp->conn->cnum)) {
 		release_posix_lock(br_lck->fsp, plock->start, plock->size);
 	}
+#endif
 
 	/* Realloc so we don't leak entries per unlock call. */
 	if (count) {



More information about the samba-cvs mailing list