From: Pierangelo Masarati Date: Tue, 16 Mar 2004 21:55:45 +0000 (+0000) Subject: init 'oi' also when the backend already has overlays... X-Git-Tag: OPENLDAP_REL_ENG_2_2_BP~270 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9f5f75c7b044a751ba3fee290790ae047f360be3;p=openldap init 'oi' also when the backend already has overlays... --- diff --git a/servers/slapd/backover.c b/servers/slapd/backover.c index 21ced8051a..d97225ac47 100644 --- a/servers/slapd/backover.c +++ b/servers/slapd/backover.c @@ -267,15 +267,27 @@ overlay_register( return 0; } +slap_overinst * +overlay_next( + slap_overinst *on +) +{ + if ( on == NULL ) { + return overlays; + } + + return on->on_next; +} + static const char overtype[] = "over"; /* add an overlay to a particular backend. */ int overlay_config( BackendDB *be, const char *ov ) { - slap_overinst *on, *on2, *prev; - slap_overinfo *oi; - BackendInfo *bi; + slap_overinst *on = NULL, *on2 = NULL, *prev = NULL; + slap_overinfo *oi = NULL; + BackendInfo *bi = NULL; for ( on = overlays; on; on=on->on_next ) { if (!strcmp( ov, on->on_bi.bi_type ) ) @@ -316,13 +328,15 @@ overlay_config( BackendDB *be, const char *ov ) bi->bi_extended = over_op_extended; be->bd_info = bi; + + } else { + oi = (slap_overinfo *) be->bd_info; } #if 0 /* Walk to the end of the list of overlays, add the new * one onto the end */ - oi = (slap_overinfo *) be->bd_info; for ( prev=NULL, on2 = oi->oi_list; on2; prev=on2, on2=on2->on_next ); on2 = ch_calloc( 1, sizeof(slap_overinst) ); if ( !prev ) {