Fix prev commit, only defer open for online Add

This commit is contained in:
Howard Chu 2007-10-16 16:25:56 +00:00
parent 43359bb02f
commit 539109e4f0
2 changed files with 10 additions and 2 deletions

View 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;
}

View 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;
}