]> git.sur5r.net Git - openldap/commitdiff
don't try to delete expired entries if database does not exist (ITS#5267)
authorPierangelo Masarati <ando@openldap.org>
Sat, 8 Dec 2007 17:00:34 +0000 (17:00 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 8 Dec 2007 17:00:34 +0000 (17:00 +0000)
servers/slapd/overlays/dds.c

index ebf70ec878b8fde65af3d5032a01f13a42fbc799..41e337dfc8997b2fff4b20f4b8cbf0767fc96c88 100644 (file)
@@ -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 );