From bfd50b6ec5f4d6c2edc5d137404819ce2a88f32c Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 8 Dec 2007 17:00:34 +0000 Subject: [PATCH] don't try to delete expired entries if database does not exist (ITS#5267) --- servers/slapd/overlays/dds.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/servers/slapd/overlays/dds.c b/servers/slapd/overlays/dds.c index ebf70ec878..41e337dfc8 100644 --- a/servers/slapd/overlays/dds.c +++ b/servers/slapd/overlays/dds.c @@ -184,7 +184,16 @@ done_search:; op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx ); filter_free_x( op, op->ors_filter ); - if ( rs.sr_err != LDAP_SUCCESS ) { + switch ( rs.sr_err ) { + case LDAP_SUCCESS: + break; + + case LDAP_NO_SUCH_OBJECT: + /* (ITS#5267) database not created yet? */ + rs.sr_err = LDAP_SUCCESS; + /* fallthru */ + + default: Log1( LDAP_DEBUG_ANY, LDAP_LEVEL_ERR, "DDS expired objects lookup failed err=%d\n", rs.sr_err ); -- 2.39.5