Skip to content
Snippets Groups Projects
Commit 6b55e03b authored by Howard Chu's avatar Howard Chu
Browse files

ITS#5240 sync ITS#5183 fix.

parent 72b40720
No related branches found
No related tags found
No related merge requests found
......@@ -139,7 +139,7 @@ bdb_db_cache(
if( rc != 0 ) {
Debug( LDAP_DEBUG_ANY,
"bdb_db_cache: db_open(%s) failed: %s (%d)\n",
name, db_strerror(rc), rc );
name->bv_val, db_strerror(rc), rc );
ldap_pvt_thread_mutex_unlock( &bdb->bi_database_mutex );
return rc;
}
......
......@@ -30,13 +30,13 @@
static const struct bdbi_database {
char *file;
char *name;
struct berval name;
int type;
int flags;
} bdbi_databases[] = {
{ "id2entry" BDB_SUFFIX, "id2entry", DB_BTREE, 0 },
{ "dn2id" BDB_SUFFIX, "dn2id", DB_BTREE, 0 },
{ NULL, NULL, 0, 0 }
{ "id2entry" BDB_SUFFIX, BER_BVC("id2entry"), DB_BTREE, 0 },
{ "dn2id" BDB_SUFFIX, BER_BVC("dn2id"), DB_BTREE, 0 },
{ NULL, BER_BVNULL, 0, 0 }
};
typedef void * db_malloc(size_t);
......@@ -373,7 +373,7 @@ shm_retry:
BDB_INDICES * sizeof(struct bdb_db_info *) );
/* open (and create) main database */
for( i = 0; bdbi_databases[i].name; i++ ) {
for( i = 0; bdbi_databases[i].name.bv_val; i++ ) {
struct bdb_db_info *db;
db = (struct bdb_db_info *) ch_calloc(1, sizeof(struct bdb_db_info));
......@@ -546,7 +546,7 @@ bdb_db_close( BackendDB *be, ConfigReply *cr )
rc = db->bdi_db->close( db->bdi_db, 0 );
/* Lower numbered names are not strdup'd */
if( bdb->bi_ndatabases >= BDB_NDB )
free( db->bdi_name );
free( db->bdi_name.bv_val );
free( db );
}
free( bdb->bi_databases );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment