]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/init.c
Removed unnecessary definition that is already in core.schema.
[openldap] / servers / slapd / back-ldbm / init.c
index b3c2845fa9ca63cb7319554137fcf2fd5e6106b1..34bceb7967a1dfade18a5ee929b31166a27a464a 100644 (file)
@@ -36,6 +36,7 @@ ldbm_back_initialize(
        bi->bi_op_delete = ldbm_back_delete;
        bi->bi_op_abandon = ldbm_back_abandon;
 
+       bi->bi_entry_release_rw = ldbm_back_entry_release_rw;
 #ifdef SLAPD_ACLGROUPS
        bi->bi_acl_group = ldbm_back_group;
 #endif
@@ -109,10 +110,12 @@ ldbm_back_db_init(
        li->li_directory = ch_strdup( DEFAULT_DB_DIRECTORY );
 
        /* always index dn, id2children, objectclass (used in some searches) */
-       argv[ 0 ] = "dn";
-       argv[ 1 ] = "dn";
-       argv[ 2 ] = NULL;
-       attr_syntax_config( "ldbm dn initialization", 0, 2, argv );
+       if ( !at_find( "dn" ) ) {
+               argv[ 0 ] = "dn";
+               argv[ 1 ] = "dn";
+               argv[ 2 ] = NULL;
+               attr_syntax_config( "ldbm dn initialization", 0, 2, argv );
+       }
        argv[ 0 ] = "dn";
        argv[ 1 ] = "sub";
        argv[ 2 ] = "eq";
@@ -157,6 +160,19 @@ ldbm_back_db_destroy(
 )
 {
        /* should free/destroy every in be_private */
+#ifdef SLAP_CLEANUP
+       struct ldbminfo *li = (struct ldbminfo *) be->be_private;
+       free( li->li_nextid_file );
+       free( li->li_directory );
+       attr_index_destroy( li->li_attrs );
+
+       ldap_pvt_thread_mutex_destroy( &li->li_root_mutex );
+       ldap_pvt_thread_mutex_destroy( &li->li_add_mutex );
+       ldap_pvt_thread_mutex_destroy( &li->li_cache.c_mutex );
+       ldap_pvt_thread_mutex_destroy( &li->li_nextid_mutex );
+       ldap_pvt_thread_mutex_destroy( &li->li_dbcache_mutex );
+       ldap_pvt_thread_cond_destroy( &li->li_dbcache_cv );
+#endif /* SLAP_CLEANUP */
        free( be->be_private );
        be->be_private = NULL;
        return 0;