]> git.sur5r.net Git - openldap/commitdiff
More for ITS#5173
authorQuanah Gibson-Mount <quanah@openldap.org>
Thu, 18 Oct 2007 02:56:53 +0000 (02:56 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 18 Oct 2007 02:56:53 +0000 (02:56 +0000)
servers/slapd/overlays/pcache.c
servers/slapd/overlays/translucent.c

index a8698248efbfd279009895b58f82aa87721286e3..6ece33365c0356ead69d56ffd03fc7a80f8cc6aa 100644 (file)
@@ -2647,7 +2647,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 1b33da5c2473429b9a51d055d53a91c336309b1e..d53f2ffe0bf427ae0d767be79758ef039c9d9dbe 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;
 }