]> git.sur5r.net Git - openldap/commitdiff
ITS#5961 fix prev commit
authorHoward Chu <hyc@openldap.org>
Thu, 19 Feb 2009 22:12:23 +0000 (22:12 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 19 Feb 2009 22:12:23 +0000 (22:12 +0000)
servers/slapd/back-bdb/init.c

index a029fee3c8266d843572705cc1de94c5944a3a1a..c92ebcef445f08c02608e6d4f38efbcae4d6bdaa 100644 (file)
@@ -333,10 +333,10 @@ shm_retry:
                /* Regular open failed, probably a missing shm environment.
                 * Start over, do a recovery.
                 */
-               if ( !do_recover && bdb->bi_shm_key ) {
+               if ( !do_recover && bdb->bi_shm_key && do_retry ) {
                        bdb->bi_dbenv->close( bdb->bi_dbenv, 0 );
                        rc = db_env_create( &bdb->bi_dbenv, 0 );
-                       if( rc == 0 && do_retry ) {
+                       if( rc == 0 ) {
                                Debug( LDAP_DEBUG_ANY, LDAP_XSTRING(bdb_db_open)
                                        ": database \"%s\": "
                                        "shared memory env open failed, assuming stale env.\n",