]> git.sur5r.net Git - openldap/commitdiff
Set lock detector to DEFAULT, not NORUN.
authorKurt Zeilenga <kurt@openldap.org>
Mon, 21 Jan 2002 08:19:28 +0000 (08:19 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 21 Jan 2002 08:19:28 +0000 (08:19 +0000)
Clean up some error handling

servers/slapd/back-bdb/init.c
servers/slapd/backend.c

index 6f56376262686cc328dcc7a637683efa4acc7ac1..cecf9d6ddb08943ce3d79f30e685ea788c87b40f 100644 (file)
@@ -79,7 +79,11 @@ bdb_db_init( BackendDB *be )
        bdb->bi_txn = 1;        /* default to using transactions */
 
 #ifndef NO_THREADS
+#if 0
        bdb->bi_lock_detect = DB_LOCK_NORUN;
+#else
+       bdb->bi_lock_detect = DB_LOCK_DEFAULT;
+#endif
 #endif
 
        ldap_pvt_thread_mutex_init( &bdb->bi_database_mutex );
@@ -356,7 +360,6 @@ bdb_db_destroy( BackendDB *be )
 
        /* close db environment */
        if( bdb->bi_dbenv ) {
-
                /* force a checkpoint */
                if( bdb->bi_txn ) {
                        rc = TXN_CHECKPOINT( bdb->bi_dbenv, 0, 0, DB_FORCE );
index 7ddf2f9640ddefae13a274e50b915a89bda3111c..1fa476c6cfeb974830af0f7dcc3484c57808e01d 100644 (file)
@@ -272,11 +272,11 @@ int backend_startup(Backend *be)
                if(rc != 0) {
 #ifdef NEW_LOGGING
                        LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
-                                  "backend_startup: bi_db_open failed!\n" ));
+                               "backend_startup: bi_db_open failed! (%d)\n", rc ));
 #else
                        Debug( LDAP_DEBUG_ANY,
-                               "backend_startup: bi_db_open failed!\n",
-                               0, 0, 0 );
+                               "backend_startup: bi_db_open failed! (%d)\n",
+                               rc, 0, 0 );
 #endif
                        return rc;
                }
@@ -322,11 +322,12 @@ int backend_startup(Backend *be)
                if(rc != 0) {
 #ifdef NEW_LOGGING
                        LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
-                                  "backend_startup: bi_db_open %d failed!\n", i ));
+                               "backend_startup: bi_db_open(%d) failed! (%d)\n",
+                               i, rc ));
 #else
                        Debug( LDAP_DEBUG_ANY,
-                               "backend_startup: bi_db_open %d failed!\n",
-                               i, 0, 0 );
+                               "backend_startup: bi_db_open(%d) failed! (%d)\n",
+                               i, rc, 0 );
 #endif
                        return rc;
                }