]> git.sur5r.net Git - openldap/commitdiff
ITS#5956 only retry attaching to SHM once
authorHoward Chu <hyc@openldap.org>
Wed, 18 Feb 2009 00:14:16 +0000 (00:14 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 18 Feb 2009 00:14:16 +0000 (00:14 +0000)
servers/slapd/back-bdb/init.c

index ab1fa16a4445490324de27f6d157c3d7013a1abe..f34271a0dba71790531fe521d6a899894ae7f808 100644 (file)
@@ -111,6 +111,7 @@ bdb_db_open( BackendDB *be, ConfigReply *cr )
        Entry *e = NULL;
        int do_recover = 0, do_alock_recover = 0;
        int alockt, quick = 0;
+       int do_retry = 1;
 
        if ( be->be_suffix == NULL ) {
                Debug( LDAP_DEBUG_ANY,
@@ -340,7 +341,10 @@ shm_retry:
                                        ": database \"%s\": "
                                        "shared memory env open failed, assuming stale env.\n",
                                        be->be_suffix[0].bv_val, 0, 0 );
-                               goto shm_retry;
+                               if ( do_retry ) {
+                                       do_retry = 0;
+                                       goto shm_retry;
+                               }
                        }
                }
                Debug( LDAP_DEBUG_ANY,