From: Howard Chu Date: Thu, 19 Feb 2009 22:12:23 +0000 (+0000) Subject: ITS#5961 fix prev commit X-Git-Tag: ACLCHECK_0~802 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=06935571615a311e83c839d0966a8225c9884d98;p=openldap ITS#5961 fix prev commit --- diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index a029fee3c8..c92ebcef44 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -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",