mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-18 11:05:48 +08:00
Backout recent initialization/startup changes in prep for new
frontend->backend interface.
This commit is contained in:
parent
fc44d42c53
commit
d27b2f811e
@ -54,8 +54,6 @@ new_backend(
|
||||
be->be_config = ldbm_back_config;
|
||||
be->be_init = ldbm_back_init;
|
||||
be->be_close = ldbm_back_close;
|
||||
be->be_startup = ldbm_back_startup;
|
||||
be->be_shutdown = ldbm_back_shutdown;
|
||||
#ifdef SLAPD_ACLGROUPS
|
||||
be->be_group = ldbm_back_group;
|
||||
#endif
|
||||
@ -272,32 +270,6 @@ be_isroot_pw( Backend *be, char *ndn, struct berval *cred )
|
||||
return result == 0;
|
||||
}
|
||||
|
||||
void
|
||||
be_startup( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
for ( i = 0; i < nbackends; i++ ) {
|
||||
if ( backends[i].be_startup != NULL ) {
|
||||
(*backends[i].be_startup)( &backends[i] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
be_shutdown( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
for ( i = 0; i < nbackends; i++ ) {
|
||||
if ( backends[i].be_shutdown != NULL ) {
|
||||
(*backends[i].be_shutdown)( &backends[i] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
be_close( void )
|
||||
{
|
||||
|
@ -33,16 +33,8 @@ static void fp_parse_line(char *line, int *argcp, char **argv);
|
||||
|
||||
static char *strtok_quote(char *line, char *sep);
|
||||
|
||||
/* the old interface for tools */
|
||||
void
|
||||
read_config( char *fname, Backend **bep, FILE *pfp )
|
||||
{
|
||||
read_config_env( fname, bep, pfp, 0 );
|
||||
}
|
||||
|
||||
/* the new interface for slapd */
|
||||
void
|
||||
read_config_env( char *fname, Backend **bep, FILE *pfp, int startup )
|
||||
{
|
||||
FILE *fp;
|
||||
char *line, *savefname;
|
||||
@ -479,8 +471,6 @@ read_config_env( char *fname, Backend **bep, FILE *pfp, int startup )
|
||||
}
|
||||
}
|
||||
fclose( fp );
|
||||
|
||||
if ( startup ) be_startup();
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -65,8 +65,6 @@ int be_isroot LDAP_P(( Backend *be, char *ndn ));
|
||||
int be_isroot_pw LDAP_P(( Backend *be, char *ndn, struct berval *cred ));
|
||||
char* be_root_dn LDAP_P(( Backend *be ));
|
||||
void be_close LDAP_P(( void ));
|
||||
void be_startup LDAP_P(( void ));
|
||||
void be_shutdown LDAP_P(( void ));
|
||||
|
||||
/*
|
||||
* ch_malloc.c
|
||||
@ -93,7 +91,6 @@ char ** str2charray LDAP_P(( char *str, char *brkstr ));
|
||||
*/
|
||||
|
||||
void read_config LDAP_P(( char *fname, Backend **bep, FILE *pfp ));
|
||||
void read_config_env LDAP_P(( char *fname, Backend **bep, FILE *pfp, int up ));
|
||||
|
||||
/*
|
||||
* connection.c
|
||||
@ -124,6 +121,7 @@ void entry_free LDAP_P(( Entry *e ));
|
||||
int entry_rdwr_lock LDAP_P(( Entry *e, int rw ));
|
||||
int entry_rdwr_rlock LDAP_P(( Entry *e ));
|
||||
int entry_rdwr_wlock LDAP_P(( Entry *e ));
|
||||
int entry_rdwr_trylock LDAP_P(( Entry *e, int rw ));
|
||||
int entry_rdwr_unlock LDAP_P(( Entry *e, int rw ));
|
||||
int entry_rdwr_runlock LDAP_P(( Entry *e ));
|
||||
int entry_rdwr_wunlock LDAP_P(( Entry *e ));
|
||||
@ -314,8 +312,6 @@ extern void ldbm_back_close LDAP_P((Backend *be));
|
||||
extern int ldbm_back_group LDAP_P((Backend *be, Entry *target,
|
||||
char *gr_ndn, char *op_ndn,
|
||||
char *objectclassValue, char *groupattrName ));
|
||||
extern void ldbm_back_startup LDAP_P((Backend *be));
|
||||
extern void ldbm_back_shutdown LDAP_P((Backend *be));
|
||||
#endif
|
||||
|
||||
#ifdef SLAPD_PASSWD
|
||||
|
@ -51,10 +51,6 @@ LDAP_BEGIN_DECL
|
||||
|
||||
extern int slap_debug;
|
||||
|
||||
#ifdef SLAPD_BDB2
|
||||
extern int bdb2i_do_timing;
|
||||
#endif
|
||||
|
||||
struct slap_op;
|
||||
struct slap_conn;
|
||||
|
||||
@ -137,18 +133,30 @@ typedef unsigned long ID;
|
||||
* represents an entry in core
|
||||
*/
|
||||
typedef struct entry {
|
||||
ldap_pvt_thread_rdwr_t e_rdwr; /* reader/writer lock */
|
||||
|
||||
char *e_dn; /* DN of this entry */
|
||||
char *e_ndn; /* normalized DN of this entry */
|
||||
Attribute *e_attrs; /* list of attributes + values */
|
||||
|
||||
|
||||
/*
|
||||
* The ID field should only be changed before entry is
|
||||
* inserted into a cache. The ID value is backend
|
||||
* specific.
|
||||
*/
|
||||
ID e_id; /* id of this entry - this should */
|
||||
/* really be private to back-ldbm */
|
||||
|
||||
/*
|
||||
* remaining fields require backend cache lock to access
|
||||
* These items are specific to the LDBM backend and should
|
||||
* and should be hidden.
|
||||
*/
|
||||
char e_state; /* for the cache */
|
||||
|
||||
ldap_pvt_thread_rdwr_t e_rdwr; /* reader/writer lock */
|
||||
|
||||
#define ENTRY_STATE_DELETED 1
|
||||
#define ENTRY_STATE_DELETED 1
|
||||
#define ENTRY_STATE_CREATING 2
|
||||
|
||||
int e_refcnt; /* # threads ref'ing this entry */
|
||||
struct entry *e_lrunext; /* for cache lru list */
|
||||
struct entry *e_lruprev;
|
||||
@ -275,8 +283,6 @@ struct backend {
|
||||
void (*be_config) LDAP_P((Backend *be,
|
||||
char *fname, int lineno, int argc, char **argv ));
|
||||
void (*be_init) LDAP_P((Backend *be));
|
||||
void (*be_startup) LDAP_P((Backend *be));
|
||||
void (*be_shutdown) LDAP_P((Backend *be));
|
||||
void (*be_close) LDAP_P((Backend *be));
|
||||
|
||||
#ifdef SLAPD_ACLGROUPS
|
||||
|
Loading…
Reference in New Issue
Block a user