mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
ITS#8472 only do index cleanup if DB is running
This commit is contained in:
parent
e33d1c5461
commit
7b587018ec
@ -281,6 +281,7 @@ mdb_cf_cleanup( ConfigArgs *c )
|
||||
}
|
||||
|
||||
if ( mdb->mi_flags & MDB_OPEN_INDEX ) {
|
||||
mdb->mi_flags ^= MDB_OPEN_INDEX;
|
||||
rc = mdb_attr_dbs_open( c->be, NULL, &c->reply );
|
||||
if ( rc )
|
||||
rc = LDAP_OTHER;
|
||||
@ -712,8 +713,8 @@ mdb_cf_gen( ConfigArgs *c )
|
||||
c->argc - 1, &c->argv[1], &c->reply);
|
||||
|
||||
if( rc != LDAP_SUCCESS ) return 1;
|
||||
mdb->mi_flags |= MDB_OPEN_INDEX;
|
||||
if ( mdb->mi_flags & MDB_IS_OPEN ) {
|
||||
mdb->mi_flags |= MDB_OPEN_INDEX;
|
||||
c->cleanup = mdb_cf_cleanup;
|
||||
if ( !mdb->mi_index_task ) {
|
||||
/* Start the task as soon as we finish here. Set a long
|
||||
|
Loading…
Reference in New Issue
Block a user