From: Howard Chu Date: Sun, 18 Sep 2011 20:25:38 +0000 (-0700) Subject: New mdb_close() signature X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=94c0b077d822bdd4ac4c9b19fe569ace2e4fdf58;p=openldap New mdb_close() signature --- diff --git a/servers/slapd/back-mdb/attr.c b/servers/slapd/back-mdb/attr.c index 0e32c67320..14e67d884e 100644 --- a/servers/slapd/back-mdb/attr.c +++ b/servers/slapd/back-mdb/attr.c @@ -157,14 +157,13 @@ mdb_attr_dbs_open( void mdb_attr_dbs_close( - struct mdb_info *mdb, - MDB_txn *txn + struct mdb_info *mdb ) { int i; for ( i=0; imi_nattrs; i++ ) if ( mdb->mi_attrs[i]->ai_dbi ) - mdb_close( txn, mdb->mi_attrs[i]->ai_dbi ); + mdb_close( mdb->mi_dbenv, mdb->mi_attrs[i]->ai_dbi ); } int diff --git a/servers/slapd/back-mdb/init.c b/servers/slapd/back-mdb/init.c index 4d0ca28e4a..d2880c5755 100644 --- a/servers/slapd/back-mdb/init.c +++ b/servers/slapd/back-mdb/init.c @@ -265,7 +265,6 @@ mdb_db_close( BackendDB *be, ConfigReply *cr ) { int rc; struct mdb_info *mdb = (struct mdb_info *) be->be_private; - MDB_txn *txn; /* monitor handling */ (void)mdb_monitor_db_close( be ); @@ -279,13 +278,10 @@ mdb_db_close( BackendDB *be, ConfigReply *cr ) if ( mdb->mi_dbenv ) { if ( mdb->mi_dbis[0] ) { int i; - rc = mdb_txn_begin( mdb->mi_dbenv, MDB_RDONLY, &txn ); - mdb_attr_dbs_close( mdb, txn ); + mdb_attr_dbs_close( mdb ); for ( i=0; imi_dbis[i] ); - - mdb_txn_abort( txn ); + mdb_close( mdb->mi_dbenv, mdb->mi_dbis[i] ); /* force a sync, but not if we were ReadOnly, * and not in Quick mode. diff --git a/servers/slapd/back-mdb/proto-mdb.h b/servers/slapd/back-mdb/proto-mdb.h index 50492ddf2b..9043145b46 100644 --- a/servers/slapd/back-mdb/proto-mdb.h +++ b/servers/slapd/back-mdb/proto-mdb.h @@ -33,7 +33,7 @@ int mdb_attr_slot( struct mdb_info *mdb, AttributeDescription *desc, int *insert ); int mdb_attr_dbs_open( BackendDB *be, MDB_txn *txn, struct config_reply_s *cr ); -void mdb_attr_dbs_close( struct mdb_info *mdb, MDB_txn *txn ); +void mdb_attr_dbs_close( struct mdb_info *mdb ); int mdb_attr_index_config LDAP_P(( struct mdb_info *mdb, const char *fname, int lineno,