From b000d76f22790c05d9f2158f41ecc624b2adfa70 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 21 Feb 2005 18:04:37 +0000 Subject: [PATCH] Added overlay objects --- servers/slapd/bconfig.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) 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; -- 2.39.5