From 292b96c4e1faa7b4e01b1d1a6b19f8f671ab9838 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 30 Jun 2008 10:01:41 +0000 Subject: [PATCH] extra needed by config (ITS#5355) --- servers/slapd/back-meta/init.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/servers/slapd/back-meta/init.c b/servers/slapd/back-meta/init.c index 0fe162ca35..717aa13859 100644 --- a/servers/slapd/back-meta/init.c +++ b/servers/slapd/back-meta/init.c @@ -93,6 +93,15 @@ meta_back_db_init( { metainfo_t *mi; int i; + BackendInfo *bi; + + bi = backend_info( "ldap" ); + if ( !bi || !bi->bi_extra ) { + Debug( LDAP_DEBUG_ANY, + "meta_back_db_init: needs back-ldap\n", + 0, 0, 0 ); + return 1; + } mi = ch_calloc( 1, sizeof( metainfo_t ) ); if ( mi == NULL ) { @@ -127,6 +136,8 @@ meta_back_db_init( } mi->mi_conn_priv_max = LDAP_BACK_CONN_PRIV_DEFAULT; + mi->mi_ldap_extra = (ldap_extra_t *)bi->bi_extra; + be->be_private = mi; return 0; @@ -138,7 +149,6 @@ meta_back_db_open( ConfigReply *cr ) { metainfo_t *mi = (metainfo_t *)be->be_private; - BackendInfo *bi; int i, not_always = 0, @@ -153,15 +163,6 @@ meta_back_db_open( return 1; } - bi = backend_info( "ldap" ); - if ( !bi || !bi->bi_extra ) { - Debug( LDAP_DEBUG_ANY, - "meta_back_db_open: needs back-ldap\n", - 0, 0, 0 ); - return 1; - } - mi->mi_ldap_extra = (ldap_extra_t *)bi->bi_extra; - for ( i = 0; i < mi->mi_ntargets; i++ ) { slap_bindconf sb = { BER_BVNULL }; metatarget_t *mt = mi->mi_targets[ i ];