]> git.sur5r.net Git - openldap/commitdiff
Don't bother logging lock failures for tryOnly mode
authorHoward Chu <hyc@openldap.org>
Mon, 12 Jul 2004 20:02:24 +0000 (20:02 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 12 Jul 2004 20:02:24 +0000 (20:02 +0000)
servers/slapd/back-bdb/cache.c

index 23b35fe397493d2c1dcebd6b7e4252650c45fbb6..d306add2a5003f326f0a2ad43543455477a0148b 100644 (file)
@@ -88,7 +88,7 @@ bdb_cache_entry_db_relock(
        rc = env->lock_vec(env, locker, tryOnly ? DB_LOCK_NOWAIT : 0,
                list, 2, NULL );
 
-       if (rc) {
+       if (rc && !tryOnly) {
 #ifdef NEW_LOGGING
                LDAP_LOG( CACHE, DETAIL1, 
                        "bdb_cache_entry_db_relock: entry %ld, rw %d, rc %d\n",
@@ -128,7 +128,7 @@ bdb_cache_entry_db_lock( DB_ENV *env, u_int32_t locker, EntryInfo *ei,
 
        rc = LOCK_GET(env, locker, tryOnly ? DB_LOCK_NOWAIT : 0,
                                        &lockobj, db_rw, lock);
-       if (rc) {
+       if (rc && !tryOnly) {
 #ifdef NEW_LOGGING
                LDAP_LOG( CACHE, DETAIL1, 
                        "bdb_cache_entry_db_lock: entry %ld, rw %d, rc %d\n",