mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-03 20:40:05 -05:00
ITS#10219 Modify of olcDisabled by removing and adding a value invokes db_open twice
Do not invoke db_open if the database is not actually disabled
This commit is contained in:
parent
5740d1747d
commit
6b4b68b13a
1 changed files with 9 additions and 7 deletions
|
|
@ -1636,14 +1636,16 @@ config_generic(ConfigArgs *c) {
|
|||
|
||||
case CFG_DISABLED:
|
||||
if ( c->bi ) {
|
||||
c->bi->bi_flags &= ~SLAP_DBFLAG_DISABLED;
|
||||
if ( c->bi->bi_db_open ) {
|
||||
BackendInfo *bi_orig = c->be->bd_info;
|
||||
c->be->bd_info = c->bi;
|
||||
rc = c->bi->bi_db_open( c->be, &c->reply );
|
||||
c->be->bd_info = bi_orig;
|
||||
if ( c->bi->bi_flags & SLAP_DBFLAG_DISABLED ) {
|
||||
c->bi->bi_flags &= ~SLAP_DBFLAG_DISABLED;
|
||||
if ( c->bi->bi_db_open ) {
|
||||
BackendInfo *bi_orig = c->be->bd_info;
|
||||
c->be->bd_info = c->bi;
|
||||
rc = c->bi->bi_db_open( c->be, &c->reply );
|
||||
c->be->bd_info = bi_orig;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if ( c->be->be_flags & SLAP_DBFLAG_DISABLED ){
|
||||
c->be->be_flags &= ~SLAP_DBFLAG_DISABLED;
|
||||
rc = backend_startup_one( c->be, &c->reply );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue