ITS#3996 fix glue/syncprov interaction

This commit is contained in:
Howard Chu 2005-09-27 15:10:57 +00:00
parent a0db9c1341
commit 12733ab92f
5 changed files with 14 additions and 7 deletions

View file

@ -837,7 +837,7 @@ typedef struct glue_Addrec {
static glue_Addrec *ga_list;
/* Attach all the subordinate backends to their superior */
static int
int
glue_sub_attach()
{
glue_Addrec *ga, *gnext = NULL;
@ -939,8 +939,5 @@ glue_sub_init()
glue.on_bi.bi_chk_referrals = glue_chk_referrals;
glue.on_bi.bi_chk_controls = glue_chk_controls;
rc = overlay_register( &glue );
if ( rc ) return rc;
return glue_sub_attach();
return overlay_register( &glue );
}

View file

@ -216,6 +216,15 @@ slap_init( int mode, const char *name )
return 1;
}
if ( glue_sub_init() ) {
ldap_debug |= 1;
Debug( LDAP_DEBUG_ANY,
"%s: glue/subordinate init failed\n",
name, 0, 0 );
return 1;
}
if ( acl_init() ) {
ldap_debug |= 1;
Debug( LDAP_DEBUG_ANY,

View file

@ -631,7 +631,7 @@ unhandled_option:;
}
}
if ( glue_sub_init( ) != 0 ) {
if ( glue_sub_attach( ) != 0 ) {
Debug( LDAP_DEBUG_ANY,
"subordinate config error\n",
0, 0, 0 );

View file

@ -395,6 +395,7 @@ LDAP_SLAPD_V(BackendInfo) slap_binfo[];
*/
LDAP_SLAPD_F (int) glue_sub_init( void );
LDAP_SLAPD_F (int) glue_sub_attach( void );
LDAP_SLAPD_F (int) glue_sub_add( BackendDB *be, int advert, int online );
LDAP_SLAPD_F (int) glue_sub_del( BackendDB *be );

View file

@ -424,7 +424,7 @@ slap_tool_init(
break;
}
rc = glue_sub_init();
rc = glue_sub_attach();
if ( rc != 0 ) {
fprintf( stderr, "%s: subordinate configuration error\n", progname );