From: Pierangelo Masarati Date: Sat, 8 Dec 2007 17:00:34 +0000 (+0000) Subject: don't try to delete expired entries if database does not exist (ITS#5267) X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~336 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bfd50b6ec5f4d6c2edc5d137404819ce2a88f32c;p=openldap don't try to delete expired entries if database does not exist (ITS#5267) --- 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 );