Backout startup/initialization changes in preparation for new

frontend->backend interface.
This commit is contained in:
Kurt Zeilenga 1999-02-04 17:28:49 +00:00
parent c6882d4670
commit fc44d42c53
5 changed files with 9 additions and 27 deletions

View 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

View 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"

View 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 ?

View 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 */

View 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
*/