]> git.sur5r.net Git - openldap/commitdiff
Disable sub directory support for now
authorKurt Zeilenga <kurt@openldap.org>
Mon, 25 Sep 2000 21:30:15 +0000 (21:30 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 25 Sep 2000 21:30:15 +0000 (21:30 +0000)
servers/slapd/back-bdb/back-bdb.h
servers/slapd/back-bdb/init.c

index e47b9e5310bfc5e2d85c34c992a6c9a018b42f21..fec1848d9640d2256fe20a01d05b6670b7d0237a 100644 (file)
@@ -41,9 +41,15 @@ LDAP_BEGIN_DECL
 
 #define BDB_DBENV_HOME LDAP_RUNDIR LDAP_DIRSEP "openldap-bdb"
 
+#ifdef BDB_SUBDIRS
 #define BDB_TMP_SUBDIR LDAP_DIRSEP "tmp"
 #define BDB_LG_SUBDIR  LDAP_DIRSEP "log"
 #define BDB_DATA_SUBDIR        LDAP_DIRSEP "data"
+#else
+#define BDB_TMP_SUBDIR BDB_DBENV_HOME
+#define BDB_LG_SUBDIR  BDB_DBENV_HOME
+#define BDB_DATA_SUBDIR        BDB_DBENV_HOME
+#endif
 
 #define BDB_NEXTID             0
 #define BDB_DN2ID              1
index 046a060900d238cec3ebfefa43702e024bc73290..8dc2e1a62f92dc4f26105d2226684bce1f42a11a 100644 (file)
@@ -94,6 +94,7 @@ bdb_db_open( BackendDB *be )
        bdb->bi_dbenv->set_errpfx( bdb->bi_dbenv, be->be_suffix[0] );
        bdb->bi_dbenv->set_errcall( bdb->bi_dbenv, bdb_errcall );
 
+#ifdef BDB_SUBDIRS
        {
                char dir[MAXPATHLEN];
                size_t len = strlen( bdb->bi_dbenv_home );
@@ -129,6 +130,11 @@ bdb_db_open( BackendDB *be )
                        return rc;
                }
        }
+#endif
+
+       Debug( LDAP_DEBUG_TRACE,
+               "bi_back_db_open: dbenv_open(%s)\n",
+               bdb->bi_dbenv_home, 0, 0);
 
        rc = bdb->bi_dbenv->open( bdb->bi_dbenv,
                bdb->bi_dbenv_home,
@@ -136,8 +142,8 @@ bdb_db_open( BackendDB *be )
                bdb->bi_dbenv_mode );
        if( rc != 0 ) {
                Debug( LDAP_DEBUG_ANY,
-                       "bi_back_db_open: dbenv_open(%s) failed: %s (%d)\n",
-                       bdb->bi_dbenv_home, db_strerror(rc), rc );
+                       "bi_back_db_open: dbenv_open failed: %s (%d)\n",
+                       db_strerror(rc), rc, 0 );
                return rc;
        }