Author: tridge
Date: 2005-09-26 01:37:46 +0000 (Mon, 26 Sep 2005)
New Revision: 10494

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

Log:
- don't generate a tdb log message for any type of failed lock probe

- if the lock upgrade loop ever fails then log a warning


Modified:
   branches/SAMBA_4_0/source/lib/tdb/common/lock.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/tdb/common/lock.c
===================================================================
--- branches/SAMBA_4_0/source/lib/tdb/common/lock.c     2005-09-26 01:28:49 UTC 
(rev 10493)
+++ branches/SAMBA_4_0/source/lib/tdb/common/lock.c     2005-09-26 01:37:46 UTC 
(rev 10494)
@@ -65,11 +65,7 @@
                /* Generic lock error. errno set by fcntl.
                 * EAGAIN is an expected return from non-blocking
                 * locks. */
-               if (errno != EAGAIN) {
-                       TDB_LOG((tdb, 5, "tdb_brlock failed (fd=%d) at offset 
%d rw_type=%d lck_type=%d len=%d: %s\n", 
-                                tdb->fd, offset, rw_type, lck_type, len,
-                                strerror(errno)));
-               } else if (!probe && lck_type != F_SETLK) {
+               if (!probe && lck_type != F_SETLK) {
                        /* Ensure error code is set for log fun to examine. */
                        tdb->ecode = TDB_ERR_LOCK;
                        TDB_LOG((tdb, 5,"tdb_brlock failed (fd=%d) at offset %d 
rw_type=%d lck_type=%d\n", 
@@ -103,6 +99,7 @@
                tv.tv_usec = 1;
                select(0, NULL, NULL, NULL, &tv);
        }
+       TDB_LOG((tdb, 5,"tdb_brlock_upgrade failed at offset %d\n", offset));
        return -1;
 }
 

Reply via email to