From: Howard Chu Date: Tue, 23 Dec 2003 14:18:47 +0000 (+0000) Subject: Execute overlays in reverse of config order. X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~114 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=171e934bf03d66db26e40a645538930ea9476039;p=openldap Execute overlays in reverse of config order. --- diff --git a/servers/slapd/backover.c b/servers/slapd/backover.c index 46bd7a439e..f63ac792a9 100644 --- a/servers/slapd/backover.c +++ b/servers/slapd/backover.c @@ -318,6 +318,7 @@ overlay_config( BackendDB *be, const char *ov ) be->bd_info = bi; } +#if 0 /* Walk to the end of the list of overlays, add the new * one onto the end */ @@ -332,6 +333,16 @@ overlay_config( BackendDB *be, const char *ov ) *on2 = *on; on2->on_next = NULL; on2->on_info = oi; +#else + /* Insert new overlay on head of list. Overlays are executed + * in reverse of config order... + */ + on2 = ch_calloc( 1, sizeof(slap_overinst) ); + *on2 = *on; + on2->on_info = oi; + on2->on_next = oi->oi_list; + oi->oi_list = on2; +#endif /* Any initialization needed? */ if ( on->on_bi.bi_db_init ) {