]> git.sur5r.net Git - openldap/commitdiff
Fix prev commit, only defer open for online Add
authorHoward Chu <hyc@openldap.org>
Tue, 16 Oct 2007 16:25:56 +0000 (16:25 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 16 Oct 2007 16:25:56 +0000 (16:25 +0000)
servers/slapd/overlays/pcache.c
servers/slapd/overlays/translucent.c

index e93b2b1d2a8ecce2989c2c1d52d28104e0e25403..618a7bca45c71ac1156f50286b376a6cf704de77 100644 (file)
@@ -2671,7 +2671,11 @@ pc_ldadd( CfEntryInfo *p, Entry *e, ConfigArgs *ca )
        on = (slap_overinst *)p->ce_bi;
        cm = on->on_bi.bi_private;
        ca->be = &cm->db;
-       ca->cleanup = pc_ldadd_cleanup;
+       /* Defer open if this is an LDAPadd */
+       if ( CONFIG_ONLINE_ADD( ca ))
+               ca->cleanup = pc_ldadd_cleanup;
+       else
+               cm->defer_db_open = 0;
        ca->private = on;
        return LDAP_SUCCESS;
 }
index 53dde555932fa2853815ce3ce144f858a90c6609..3b526cba090e8ff0b413cebc428874cb3d12f20c 100644 (file)
@@ -109,7 +109,11 @@ translucent_ldadd( CfEntryInfo *cei, Entry *e, ConfigArgs *ca )
        ov = on->on_bi.bi_private;
        ca->be = &ov->db;
        ca->private = on;
-       ca->cleanup = translucent_ldadd_cleanup;
+       if ( CONFIG_ONLINE_ADD( ca ))
+               ca->cleanup = translucent_ldadd_cleanup;
+       else
+               ov->defer_db_open = 0;
+
        return LDAP_SUCCESS;
 }