#include <lutil.h>
#include <ldap_rq.h>
#include "alock.h"
+#include "config.h"
static const struct bdbi_database {
char *file;
#define bdb_db_close BDB_SYMBOL(db_close)
static int
-bdb_db_init( BackendDB *be )
+bdb_db_init( BackendDB *be, ConfigReply *cr )
{
struct bdb_info *bdb;
int rc;
}
static int
-bdb_db_close( BackendDB *be );
+bdb_db_close( BackendDB *be, ConfigReply *cr );
static int
-bdb_db_open( BackendDB *be )
+bdb_db_open( BackendDB *be, ConfigReply *cr )
{
int rc, i;
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
#ifndef BDB_MULTIPLE_SUFFIXES
if ( be->be_suffix[1].bv_val ) {
- Debug( LDAP_DEBUG_ANY,
- LDAP_XSTRING(bdb_db_open) ": only one suffix allowed\n", 0, 0, 0 );
+ if (cr) {
+ snprintf(cr->msg, sizeof(cr->msg), "only one suffix allowed");
+ Debug( LDAP_DEBUG_ANY,
+ LDAP_XSTRING(bdb_db_open) ": %s\n", cr->msg, 0, 0 );
+ }
return -1;
}
#endif
Debug( LDAP_DEBUG_ANY,
LDAP_XSTRING(bdb_db_open) ": Cannot access database directory %s (%d)\n",
bdb->bi_dbenv_home, errno, 0 );
- return -1;
+ return -1;
}
/* Perform database use arbitration/recovery logic */
return 0;
fail:
- bdb_db_close( be );
+ bdb_db_close( be, NULL );
return rc;
}
static int
-bdb_db_close( BackendDB *be )
+bdb_db_close( BackendDB *be, ConfigReply *cr )
{
int rc;
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
}
static int
-bdb_db_destroy( BackendDB *be )
+bdb_db_destroy( BackendDB *be, ConfigReply *cr )
{
struct bdb_info *bdb = (struct bdb_info *) be->be_private;