From: Howard Chu Date: Mon, 21 Feb 2005 18:04:37 +0000 (+0000) Subject: Added overlay objects X-Git-Tag: OPENLDAP_REL_ENG_2_3_BP~141 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b000d76f22790c05d9f2158f41ecc624b2adfa70;p=openldap Added overlay objects --- diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 4d1339d0af..6c9c8b2a05 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -387,12 +387,18 @@ config_back_db_open( BackendDB *be ) /* Create database nodes... */ for (i=0; ibd_info; + if ( overlay_is_over( bptr )) { + oi = bptr->bd_info->bi_private; + bi = oi->oi_orig; + } else { + bi = bptr->bd_info; + } rdn.bv_val = c.log; rdn.bv_len = sprintf(rdn.bv_val, "%s={%0x}%s", cfAd_database->ad_cname.bv_val, i, bi->bi_type); @@ -410,6 +416,31 @@ config_back_db_open( BackendDB *be ) } ceprev = ce; /* Iterate through overlays */ + if ( oi ) { + slap_overinst *on; + Entry *oe; + CfEntryInfo *opar = ce, *oprev = NULL; + int j; + + for (j=0,on=oi->oi_list; on; j++,on=on->on_next) { + rdn.bv_val = c.log; + rdn.bv_len = sprintf(rdn.bv_val, "%s={%0x}%s", + cfAd_overlay->ad_cname.bv_val, j, on->on_bi.bi_type ); + oe = config_alloc_entry( &e->e_nname, &rdn ); + ce = oe->e_private; + c.be = bptr; + c.bi = &on->on_bi; + ce->ce_be = c.be; + ce->ce_bi = c.bi; + config_build_entry( &c, oe, cfOc_overlay, &rdn, ct, BI_TABLE ); + if ( !opar->ce_kids ) { + opar->ce_kids = ce; + } else { + oprev->ce_sibs = ce; + } + oprev = ce; + } + } } return 0;