]> git.sur5r.net Git - openldap/commitdiff
Release cache locker on db close
authorHoward Chu <hyc@openldap.org>
Mon, 12 Jul 2004 14:29:13 +0000 (14:29 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 12 Jul 2004 14:29:13 +0000 (14:29 +0000)
servers/slapd/back-bdb/init.c

index 8973010a0d14b4a517cf8b721edf8932cd7d691c..e9f616c602f76059a5717aa1521d4d21fbed77ed 100644 (file)
@@ -448,7 +448,7 @@ bdb_db_open( BackendDB *be )
                return rc;
        }
 
-       bdb->bi_dbenv->lock_id(bdb->bi_dbenv, &bdb->bi_cache.c_locker);
+       XLOCK_ID(bdb->bi_dbenv, &bdb->bi_cache.c_locker);
 
        /* <insert> open (and create) index databases */
        return 0;
@@ -490,6 +490,8 @@ bdb_db_close( BackendDB *be )
                ldap_pvt_thread_rdwr_wunlock ( &bdb->bi_idl_tree_rwlock );
        }
 
+       XLOCK_ID_FREE(bdb->bi_dbenv, bdb->bi_cache.c_locker);
+
        return 0;
 }