From 10a61120ca554adee21ab44f11b78fc5292b6ee6 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 21 Aug 2009 17:07:12 +0000 Subject: [PATCH] tell what database initialization failed based on the suffix --- servers/slapd/backend.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index ac9dda235f..ed39545735 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -226,9 +226,22 @@ int backend_startup_one(Backend *be, ConfigReply *cr) (void)backend_set_controls( be ); } else { + char *type = be->bd_info->bi_type; + char *suffix = "(null)"; + + if ( overlay_is_over( be ) ) { + slap_overinfo *oi = (slap_overinfo *)be->bd_info->bi_private; + type = oi->oi_orig->bi_type; + } + + if ( be->be_suffix != NULL && !BER_BVISNULL( &be->be_suffix[0] ) ) { + suffix = be->be_suffix[0].bv_val; + } + Debug( LDAP_DEBUG_ANY, - "backend_startup_one: bi_db_open failed! (%d)\n", - rc, 0, 0 ); + "backend_startup_one (type=%s, suffix=\"%s\"): " + "bi_db_open failed! (%d)\n", + type, suffix, rc ); } } -- 2.39.5