From: Luke Howard Date: Fri, 22 Jul 2005 03:17:36 +0000 (+0000) Subject: SLAPI plugins are no longer global; global SLAPI plugins should be X-Git-Tag: OPENLDAP_AC_BP~271 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=acae40faa0a7a3c74eb71d407098ae79cdc1f2bd;p=openldap SLAPI plugins are no longer global; global SLAPI plugins should be associated with the frontend --- diff --git a/servers/slapd/slapi/plugin.c b/servers/slapd/slapi/plugin.c index 7063c00f78..e9793cb72e 100644 --- a/servers/slapd/slapi/plugin.c +++ b/servers/slapd/slapi/plugin.c @@ -163,7 +163,7 @@ slapi_int_register_plugin( Slapi_PBlock *pSavePB; int rc = LDAP_SUCCESS; - assert( be != NULL ); /* global plugins are now stored in frontendDB */ + assert( be != NULL ); pTmpPB = (Slapi_PBlock *)be->be_pb; if ( pTmpPB == NULL ) { @@ -217,32 +217,7 @@ slapi_int_get_plugins( goto done; } - /* - * First, count the plugins associated with a specific - * backend. - */ - if ( be != frontendDB ) { - pCurrentPB = (Slapi_PBlock *)be->be_pb; - - while ( pCurrentPB != NULL && rc == LDAP_SUCCESS ) { - rc = slapi_pblock_get( pCurrentPB, functype, &FuncPtr ); - if ( rc == LDAP_SUCCESS ) { - if ( FuncPtr != NULL ) { - numPB++; - } - rc = slapi_pblock_get( pCurrentPB, - SLAPI_IBM_PBLOCK, &pCurrentPB ); - } - } - } - if ( rc != LDAP_SUCCESS ) { - goto done; - } - - /* - * Then, count the global plugins. - */ - pCurrentPB = (Slapi_PBlock *)frontendDB->be_pb; + pCurrentPB = (Slapi_PBlock *)be->be_pb; while ( pCurrentPB != NULL && rc == LDAP_SUCCESS ) { rc = slapi_pblock_get( pCurrentPB, functype, &FuncPtr ); @@ -254,9 +229,6 @@ slapi_int_get_plugins( SLAPI_IBM_PBLOCK, &pCurrentPB ); } } - if ( rc != LDAP_SUCCESS ) { - goto done; - } if ( numPB == 0 ) { *ppFuncPtrs = NULL; @@ -275,23 +247,7 @@ slapi_int_get_plugins( goto done; } - if ( be != frontendDB ) { - pCurrentPB = (Slapi_PBlock *)be->be_pb; - - while ( pCurrentPB != NULL && rc == LDAP_SUCCESS ) { - rc = slapi_pblock_get( pCurrentPB, functype, &FuncPtr ); - if ( rc == LDAP_SUCCESS ) { - if ( FuncPtr != NULL ) { - *pTmpFuncPtr = FuncPtr; - pTmpFuncPtr++; - } - rc = slapi_pblock_get( pCurrentPB, - SLAPI_IBM_PBLOCK, &pCurrentPB ); - } - } - } - - pCurrentPB = (Slapi_PBlock *)frontendDB->be_pb; + pCurrentPB = (Slapi_PBlock *)be->be_pb; while ( pCurrentPB != NULL && rc == LDAP_SUCCESS ) { rc = slapi_pblock_get( pCurrentPB, functype, &FuncPtr ); @@ -304,7 +260,7 @@ slapi_int_get_plugins( SLAPI_IBM_PBLOCK, &pCurrentPB ); } } - *pTmpFuncPtr = NULL ; + done: if ( rc != LDAP_SUCCESS && *ppFuncPtrs != NULL ) {