From: Pierangelo Masarati Date: Sat, 14 Jan 2006 11:12:56 +0000 (+0000) Subject: address ITS#4332; might remove dynamicObject counting X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~316 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=72d2ee4d19ee76e7d81d402c4056ce665f797045;p=openldap address ITS#4332; might remove dynamicObject counting --- diff --git a/servers/slapd/overlays/dds.c b/servers/slapd/overlays/dds.c index 30a606d6f5..8cf4e57d7d 100644 --- a/servers/slapd/overlays/dds.c +++ b/servers/slapd/overlays/dds.c @@ -1723,17 +1723,17 @@ dds_db_open( di->di_suffix = be->be_suffix; di->di_nsuffix = be->be_nsuffix; - /* force deletion of expired entries... */ - be->bd_info = (BackendInfo *)on->on_info; - rc = dds_expire( thrctx, di ); - be->bd_info = (BackendInfo *)on; - if ( rc != LDAP_SUCCESS ) { - rc = 1; - goto done; - } - /* ... so that count, if required, is accurate */ if ( di->di_max_dynamicObjects > 0 ) { + /* force deletion of expired entries... */ + be->bd_info = (BackendInfo *)on->on_info; + rc = dds_expire( thrctx, di ); + be->bd_info = (BackendInfo *)on; + if ( rc != LDAP_SUCCESS ) { + rc = 1; + goto done; + } + rc = dds_count( thrctx, be ); if ( rc != LDAP_SUCCESS ) { rc = 1;