[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Config file statement ordering (Was: (ITS#4848) Another slapd startup segfault)
Pierangelo Masarati wrote:
Please disregard the above patch, which is incorrect as well. I think
the right way to address the problem of selecting the right context for
configure statements definitely consists in attaching into the
ConfigTable a Conf->bi pointer to the BackendInfo that ConfigTable entry
belongs to. This would allow to determine if the ConfigTable entry
belongs to the underlying database, to an overlay, to the frontend or
whatever, by comparing the BackendInfo* with that of the above stuff.
Agreed. The actual pointer is not needed, just an enum to indicate which to
use. I can work that up.
Something like:
if ( c->be ) {
if ( !overlay_is_over( c->be ) ) {
ptr = c->be->be_private;
} else if (((slap_overinfo *)c->be->bd_info)->oi_orig
== Conf->bi )
{
ptr = c->be->be_private;
}
}
if ( ptr == NULL && c->bi && c->bi->bi_type == Conf->bi->bi_type ) {
ptr = c->bi->bi_private;
} else {
// error
}
or whatever.
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
Chief Architect, OpenLDAP http://www.openldap.org/project/