]> git.sur5r.net Git - openldap/commitdiff
Fix id2entry, let bdb_cache_release_all clean up EntryInfos
authorHoward Chu <hyc@openldap.org>
Tue, 22 Apr 2003 13:14:06 +0000 (13:14 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 22 Apr 2003 13:14:06 +0000 (13:14 +0000)
Fix idl_cache_put

servers/slapd/back-bdb/id2entry.c
servers/slapd/back-bdb/idl.c

index e4bc3df9bc42c72ade5e1017f936d5c3ddd31b4a..864d90b044c0f8ded602f5295c199323740a2153 100644 (file)
@@ -26,7 +26,7 @@ int bdb_id2entry_put(
 #ifdef BDB_HIER
        struct berval odn, ondn;
 
-       /* We only store rdns, and they go in the id2parent database. */
+       /* We only store rdns, and they go in the dn2id database. */
 
        odn = e->e_name; ondn = e->e_nname;
 
@@ -117,12 +117,6 @@ int bdb_id2entry(
                ch_free( data.data );
        }
 
-       if ( rc == 0 ) {
-#ifdef BDB_HIER
-               bdb_fix_dn(be, id, *e);
-#endif
-       }
-
        return rc;
 }
 
@@ -216,7 +210,7 @@ int bdb_entry_release(
                }
        } else {
                if (e->e_private != NULL)
-                       free (e->e_private);
+                       BEI(e)->bei_e = NULL;
                e->e_private = NULL;
                bdb_entry_return ( e );
        }
index 42bd02dbe2c39888d297742dd040ba364e95df37..52d24ac69d46a2276b2d9c6043c8514077dbcdd0 100644 (file)
@@ -344,6 +344,8 @@ bdb_idl_cache_put(
        bdb_idl_cache_entry_t idl_tmp;
        bdb_idl_cache_entry_t *ee;
 
+       DBT2bv( key, &idl_tmp.kstr );
+
        ee = (bdb_idl_cache_entry_t *) ch_malloc(
                sizeof( bdb_idl_cache_entry_t ) );
        ee->db = db;