]> git.sur5r.net Git - openldap/commitdiff
Backout startup/initialization changes in preparation for new
authorKurt Zeilenga <kurt@openldap.org>
Thu, 4 Feb 1999 17:28:49 +0000 (17:28 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 4 Feb 1999 17:28:49 +0000 (17:28 +0000)
frontend->backend interface.

servers/slapd/back-ldbm/Makefile.in
servers/slapd/back-ldbm/back-ldbm.h
servers/slapd/back-ldbm/dbcache.c
servers/slapd/back-ldbm/init.c
servers/slapd/back-ldbm/proto-back-ldbm.h

index 45e88364475c856268b2b0bd1e3869dbea6aea4b..985149e9d9b1819534c9f5a1bed15bcc7aae92da 100644 (file)
@@ -2,11 +2,11 @@ XSRCS = version.c
 SRCS   = idl.c add.c search.c cache.c dbcache.c dn2id.c id2entry.c \
                index.c id2children.c nextid.c abandon.c compare.c group.c \
                modify.c modrdn.c delete.c init.c config.c bind.c attr.c \
-               filterindex.c unbind.c kerberos.c close.c alias.c startup.c
+               filterindex.c unbind.c kerberos.c close.c alias.c
 OBJS   = idl.o add.o search.o cache.o dbcache.o dn2id.o id2entry.o \
                index.o id2children.o nextid.o abandon.o compare.o group.o \
                modify.o modrdn.o delete.o init.o config.o bind.o attr.o \
-               filterindex.o unbind.o kerberos.o close.o alias.o startup.o
+               filterindex.o unbind.o kerberos.o close.o alias.o
 
 LDAP_INCDIR= ../../../include       
 LDAP_LIBDIR= ../../../libraries
index 1244bb1f93523bff7f26e08cb281ff4a6de23c33..e0816acd48ef2b6422a0028a5092522385476af2 100644 (file)
@@ -88,10 +88,6 @@ struct dbcache {
        long    dbc_blksize;
        char    *dbc_name;
        LDBM    dbc_db;
-
-#ifdef HAVE_BERKELEY_DB2
-       struct dbcache *dbc_next;
-#endif
 };
 
 /* for the cache of attribute information (which are indexed, etc.) */
@@ -138,11 +134,6 @@ struct ldbminfo {
        struct dbcache          li_dbcache[MAXDBCACHE];
        ldap_pvt_thread_mutex_t         li_dbcache_mutex;
        ldap_pvt_thread_cond_t          li_dbcache_cv;
-
-#ifdef HAVE_BERKELEY_DB2
-       /* Berkeley DB2 Environment */
-       DB_ENV li_db_env;
-#endif
 };
 
 #include "proto-back-ldbm.h"
index 4638efa30965c4e975fd6aca31b5c360541976ff..5e3549ff34f0ca0e8b722f1caa582d5bb6978cde 100644 (file)
@@ -34,7 +34,7 @@ ldbm_cache_open(
        LDBM            db;
        struct stat     st;
 
-       sprintf( buf, "%s%s%s%s", li->li_directory, DEFAULT_DIRSEP, name, suffix );
+       sprintf( buf, "%s/%s%s", li->li_directory, name, suffix );
 
        Debug( LDAP_DEBUG_TRACE, "=> ldbm_cache_open( \"%s\", %d, %o )\n", buf,
            flags, li->li_mode );
@@ -91,13 +91,8 @@ ldbm_cache_open(
                li->li_dbcache[i].dbc_name = NULL;
        }
 
-#ifdef HAVE_BERKELEY_DB2
-       if ( (li->li_dbcache[i].dbc_db = ldbm_open_env( buf, flags, li->li_mode,
-           li->li_dbcachesize, &li->li_db_env )) == NULL ) {
-#else
        if ( (li->li_dbcache[i].dbc_db = ldbm_open( buf, flags, li->li_mode,
            li->li_dbcachesize )) == NULL ) {
-#endif
                Debug( LDAP_DEBUG_TRACE,
                    "<= ldbm_cache_open NULL \"%s\" errno %d reason \"%s\")\n",
                    buf, errno, errno > -1 && errno < sys_nerr ?
index 5a7acc36173422ceb79498d4f5f263cc0e60c933..f0ae9fb7779f7f3879b44defdefaf28041b32418 100644 (file)
@@ -19,13 +19,17 @@ ldbm_back_init(
        char            *argv[ 4 ];
        int             i;
 
+       /* initialize the underlying database system */
+       ldbm_initialize();
+
        /* allocate backend-specific stuff */
        li = (struct ldbminfo *) ch_calloc( 1, sizeof(struct ldbminfo) );
 
        /* arrange to read nextid later (on first request for it) */
        li->li_nextid = NOID;
-#if    SLAPD_NEXTID_CHUNCK > 1
-       li->li_nextid_wrote = NOID
+
+#if SLAPD_NEXTID_CHUNK > 1
+       li->li_nextid_wrote = NOID;
 #endif
 
        /* default cache size */
index 5650befa2bf53f9ec4ee3b537357318a7e3871e0..5b0ecd852faaa62f0c9e993167c4e6d749f7a338 100644 (file)
@@ -121,14 +121,6 @@ int index_add_values LDAP_P(( Backend *be, char *type, struct berval **vals, ID
 /* krbv4_ldap_auth LDAP_P(( Backend *be, struct berval *cred, AUTH_DAT *ad )); */
 #endif
 
-/*
- * startup.c
- */
-
-void ldbm_back_startup  LDAP_P(( Backend *be ));
-void ldbm_back_shutdown LDAP_P(( Backend *be ));
-void ldbm_db_errcall LDAP_P(( const char *prefix, char *message ));
-
 /*
  * nextid.c
  */