From 72d2ee4d19ee76e7d81d402c4056ce665f797045 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 14 Jan 2006 11:12:56 +0000 Subject: [PATCH] address ITS#4332; might remove dynamicObject counting --- servers/slapd/overlays/dds.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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;