From: Howard Chu Date: Sat, 27 Nov 2004 14:43:07 +0000 (+0000) Subject: Let the overlay run before the backend in bi_db_close X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~199 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=30333b989c5317dfdf776ffa7a4a85004bb3eac3;p=openldap Let the overlay run before the backend in bi_db_close --- diff --git a/servers/slapd/backover.c b/servers/slapd/backover.c index a834d702d7..5547bcd6c4 100644 --- a/servers/slapd/backover.c +++ b/servers/slapd/backover.c @@ -148,7 +148,25 @@ over_db_close( BackendDB *be ) { - return over_db_func( be, db_close ); + slap_overinfo *oi = be->bd_info->bi_private; + slap_overinst *on = oi->oi_list; + BackendInfo *bi_orig = be->bd_info; + int rc = 0; + + for (; on && rc == 0; on=on->on_next) { + be->bd_info = &on->on_bi; + if ( be->bd_info->bi_db_close ) { + rc = be->bd_info->bi_db_close( be ); + } + } + + if ( be->bd_info->bi_db_close ) { + be->bd_info = oi->oi_orig; + rc = be->bd_info->bi_db_close( be ); + } + + be->bd_info = bi_orig; + return rc; } static int