From: Howard Chu Date: Tue, 16 Oct 2007 16:25:56 +0000 (+0000) Subject: Fix prev commit, only defer open for online Add X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~508 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=539109e4f0e4b763f67bdbf9100322315673f383;p=openldap Fix prev commit, only defer open for online Add --- diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index e93b2b1d2a..618a7bca45 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -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; } diff --git a/servers/slapd/overlays/translucent.c b/servers/slapd/overlays/translucent.c index 53dde55593..3b526cba09 100644 --- a/servers/slapd/overlays/translucent.c +++ b/servers/slapd/overlays/translucent.c @@ -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; }