From: Luke Howard Date: Sun, 28 Dec 2003 04:14:19 +0000 (+0000) Subject: Cleanup SLAPI namespace X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~95 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b0416d11404a861797b6455a8b16862248dcb058;p=openldap Cleanup SLAPI namespace --- diff --git a/servers/slapd/add.c b/servers/slapd/add.c index 1b06371da8..563b33800b 100644 --- a/servers/slapd/add.c +++ b/servers/slapd/add.c @@ -35,10 +35,10 @@ #ifdef LDAP_SLAPI #include "slapi.h" -static void initAddPlugin( Operation *op, +static void init_add_pblock( Operation *op, struct berval *dn, Entry *e, int manageDSAit ); -static int doPreAddPluginFNs( Operation *op ); -static void doPostAddPluginFNs( Operation *op ); +static int call_add_preop_plugins( Operation *op ); +static void call_add_postop_plugins( Operation *op ); #endif /* LDAP_SLAPI */ int @@ -239,7 +239,7 @@ do_add( Operation *op, SlapReply *rs ) } #ifdef LDAP_SLAPI - if ( op->o_pb ) initAddPlugin( op, &dn, e, manageDSAit ); + if ( op->o_pb ) init_add_pblock( op, &dn, e, manageDSAit ); #endif /* LDAP_SLAPI */ /* @@ -300,7 +300,7 @@ do_add( Operation *op, SlapReply *rs ) * will actually contain something. */ if ( op->o_pb ) { - rs->sr_err = doPreAddPluginFNs( op ); + rs->sr_err = call_add_preop_plugins( op ); if ( rs->sr_err != LDAP_SUCCESS ) { /* plugin will have sent result */ goto done; @@ -330,7 +330,7 @@ do_add( Operation *op, SlapReply *rs ) * on replicas (for now, it involves the minimum code intrusion). */ if ( op->o_pb ) { - rs->sr_err = doPreAddPluginFNs( op ); + rs->sr_err = call_add_preop_plugins( op ); if ( rs->sr_err != LDAP_SUCCESS ) { /* plugin will have sent result */ goto done; @@ -369,7 +369,7 @@ do_add( Operation *op, SlapReply *rs ) } else { #ifdef LDAP_SLAPI if ( op->o_pb ) { - rs->sr_err = doPreAddPluginFNs( op ); + rs->sr_err = call_add_preop_plugins( op ); if ( rs->sr_err != LDAP_SUCCESS ) { /* plugin will have sent result */ goto done; @@ -387,7 +387,7 @@ do_add( Operation *op, SlapReply *rs ) } #ifdef LDAP_SLAPI - if ( op->o_pb ) doPostAddPluginFNs( op ); + if ( op->o_pb ) call_add_postop_plugins( op ); #endif /* LDAP_SLAPI */ done: @@ -654,7 +654,7 @@ slap_entry2mods( } #ifdef LDAP_SLAPI -static void initAddPlugin( Operation *op, +static void init_add_pblock( Operation *op, struct berval *dn, Entry *e, int manageDSAit ) { slapi_int_pblock_set_operation( op->o_pb, op ); @@ -663,11 +663,11 @@ static void initAddPlugin( Operation *op, slapi_pblock_set( op->o_pb, SLAPI_MANAGEDSAIT, (void *)manageDSAit ); } -static int doPreAddPluginFNs( Operation *op ) +static int call_add_preop_plugins( Operation *op ) { int rc; - rc = doPluginFNs( op->o_bd, SLAPI_PLUGIN_PRE_ADD_FN, op->o_pb ); + rc = slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_PRE_ADD_FN, op->o_pb ); if ( rc < 0 ) { /* * A preoperation plugin failure will abort the @@ -695,11 +695,11 @@ static int doPreAddPluginFNs( Operation *op ) return rc; } -static void doPostAddPluginFNs( Operation *op ) +static void call_add_postop_plugins( Operation *op ) { int rc; - rc = doPluginFNs( op->o_bd, SLAPI_PLUGIN_POST_ADD_FN, op->o_pb ); + rc = slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_POST_ADD_FN, op->o_pb ); if ( rc < 0 ) { #ifdef NEW_LOGGING LDAP_LOG( OPERATION, INFO, diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 79eb82d7c9..45e80031e6 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -753,7 +753,7 @@ backend_unbind( Operation *op, SlapReply *rs ) int rc; if ( i == 0 ) slapi_int_pblock_set_operation( op->o_pb, op ); slapi_pblock_set( op->o_pb, SLAPI_BACKEND, (void *)&backends[i] ); - rc = doPluginFNs( &backends[i], SLAPI_PLUGIN_PRE_UNBIND_FN, + rc = slapi_int_call_plugins( &backends[i], SLAPI_PLUGIN_PRE_UNBIND_FN, (Slapi_PBlock *)op->o_pb ); if ( rc < 0 ) { /* @@ -778,7 +778,7 @@ backend_unbind( Operation *op, SlapReply *rs ) } #if defined( LDAP_SLAPI ) - if ( op->o_pb && doPluginFNs( &backends[i], SLAPI_PLUGIN_POST_UNBIND_FN, + if ( op->o_pb != NULL && slapi_int_call_plugins( &backends[i], SLAPI_PLUGIN_POST_UNBIND_FN, (Slapi_PBlock *)op->o_pb ) < 0 ) { #ifdef NEW_LOGGING LDAP_LOG( OPERATION, INFO, "do_unbind: Unbind postoperation plugins " diff --git a/servers/slapd/bind.c b/servers/slapd/bind.c index e881ba6bb8..07c1616279 100644 --- a/servers/slapd/bind.c +++ b/servers/slapd/bind.c @@ -373,7 +373,7 @@ do_bind( slapi_pblock_set( pb, SLAPI_BIND_METHOD, (void *)method ); slapi_pblock_set( pb, SLAPI_BIND_CREDENTIALS, (void *)&op->orb_cred ); slapi_pblock_set( pb, SLAPI_MANAGEDSAIT, (void *)(0) ); - (void) doPluginFNs( op->o_bd, SLAPI_PLUGIN_POST_BIND_FN, pb ); + (void) slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_POST_BIND_FN, pb ); } #endif /* LDAP_SLAPI */ @@ -538,7 +538,7 @@ do_bind( slapi_pblock_set( pb, SLAPI_MANAGEDSAIT, (void *)(0) ); slapi_pblock_set( pb, SLAPI_CONN_DN, (void *)(0) ); - rc = doPluginFNs( op->o_bd, SLAPI_PLUGIN_PRE_BIND_FN, pb ); + rc = slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_PRE_BIND_FN, pb ); #ifdef NEW_LOGGING LDAP_LOG( OPERATION, INFO, @@ -670,7 +670,7 @@ do_bind( } #if defined( LDAP_SLAPI ) - if ( pb && doPluginFNs( op->o_bd, SLAPI_PLUGIN_POST_BIND_FN, pb ) < 0 ) { + if ( pb != NULL && slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_POST_BIND_FN, pb ) < 0 ) { #ifdef NEW_LOGGING LDAP_LOG( OPERATION, INFO, "do_bind: Bind postoperation plugins failed\n", diff --git a/servers/slapd/compare.c b/servers/slapd/compare.c index fdfccea519..228983af14 100644 --- a/servers/slapd/compare.c +++ b/servers/slapd/compare.c @@ -266,7 +266,7 @@ do_compare( slapi_pblock_set( pb, SLAPI_COMPARE_TYPE, (void *)desc.bv_val ); slapi_pblock_set( pb, SLAPI_COMPARE_VALUE, (void *)&value ); - rs->sr_err = doPluginFNs( op->o_bd, SLAPI_PLUGIN_PRE_COMPARE_FN, pb ); + rs->sr_err = slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_PRE_COMPARE_FN, pb ); if ( rs->sr_err < 0 ) { /* * A preoperation plugin failure will abort the @@ -297,7 +297,7 @@ do_compare( } #if defined( LDAP_SLAPI ) - if ( pb && doPluginFNs( op->o_bd, SLAPI_PLUGIN_POST_COMPARE_FN, pb ) < 0 ) { + if ( pb != NULL && slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_POST_COMPARE_FN, pb ) < 0 ) { #ifdef NEW_LOGGING LDAP_LOG( OPERATION, INFO, "do_compare: compare postoperation plugins " "failed\n", 0, 0, 0 ); diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 584c8eff72..5861d4dc5b 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -2423,7 +2423,7 @@ read_config( const char *fname, int depth ) } #endif /* notdef */ - if ( netscape_plugin( be, fname, lineno, cargc, cargv ) + if ( slapi_int_read_config( be, fname, lineno, cargc, cargv ) != LDAP_SUCCESS ) { return( 1 ); } diff --git a/servers/slapd/delete.c b/servers/slapd/delete.c index e0a5c38fda..8ae91b287f 100644 --- a/servers/slapd/delete.c +++ b/servers/slapd/delete.c @@ -168,7 +168,7 @@ do_delete( slapi_pblock_set( pb, SLAPI_DELETE_TARGET, (void *)dn.bv_val ); slapi_pblock_set( pb, SLAPI_MANAGEDSAIT, (void *)manageDSAit ); - rs->sr_err = doPluginFNs( op->o_bd, SLAPI_PLUGIN_PRE_DELETE_FN, pb ); + rs->sr_err = slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_PRE_DELETE_FN, pb ); if ( rs->sr_err < 0 ) { /* * A preoperation plugin failure will abort the @@ -258,7 +258,7 @@ do_delete( } #if defined( LDAP_SLAPI ) - if ( pb && doPluginFNs( op->o_bd, SLAPI_PLUGIN_POST_DELETE_FN, pb ) < 0) { + if ( pb != NULL && slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_POST_DELETE_FN, pb ) < 0) { #ifdef NEW_LOGGING LDAP_LOG( OPERATION, INFO, "do_delete: delete postoperation plugins " "failed\n", 0, 0, 0 ); diff --git a/servers/slapd/extended.c b/servers/slapd/extended.c index cb72c4fabf..f3e85cf4a0 100644 --- a/servers/slapd/extended.c +++ b/servers/slapd/extended.c @@ -184,7 +184,7 @@ do_extended( } #ifdef LDAP_SLAPI - getPluginFunc( &op->ore_reqoid, &funcAddr ); /* NS-SLAPI extended operation */ + slapi_int_get_extop_plugin( &op->ore_reqoid, &funcAddr ); /* NS-SLAPI extended operation */ if( !funcAddr && !(ext = find_extop(supp_ext_list, &op->ore_reqoid ))) #else if( !(ext = find_extop(supp_ext_list, &op->ore_reqoid ))) diff --git a/servers/slapd/init.c b/servers/slapd/init.c index 6ab7262322..11d90a8420 100644 --- a/servers/slapd/init.c +++ b/servers/slapd/init.c @@ -205,7 +205,7 @@ int slap_startup( Backend *be ) if( rc == 0 ) { Slapi_PBlock *pb = slapi_pblock_new(); - if ( doPluginFNs( NULL, SLAPI_PLUGIN_START_FN, pb ) < 0 ) { + if ( slapi_int_call_plugins( NULL, SLAPI_PLUGIN_START_FN, pb ) < 0 ) { rc = -1; } slapi_pblock_destroy( pb ); @@ -238,8 +238,8 @@ int slap_shutdown( Backend *be ) rc = backend_shutdown( be ); #ifdef LDAP_SLAPI - pb = slapi_pblock_new( ); - (void) doPluginFNs( NULL, SLAPI_PLUGIN_CLOSE_FN, pb ); + pb = slapi_pblock_new(); + (void) slapi_int_call_plugins( NULL, SLAPI_PLUGIN_CLOSE_FN, pb ); slapi_pblock_destroy( pb ); #endif /* LDAP_SLAPI */ diff --git a/servers/slapd/main.c b/servers/slapd/main.c index d656dec7d1..2879523351 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -474,7 +474,7 @@ int main( int argc, char **argv ) #endif #ifdef LDAP_SLAPI - if ( slapi_init() != 0 ) { + if ( slapi_int_initialize() != 0 ) { #ifdef NEW_LOGGING LDAP_LOG( OPERATION, CRIT, "main: slapi initialization error\n", 0, 0, 0 ); #else diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index e390d0acf9..db3b5edb3f 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -398,7 +398,7 @@ do_modify( modv = slapi_int_modifications2ldapmods( &modlist ); slapi_pblock_set( pb, SLAPI_MODIFY_MODS, (void *)modv ); - rs->sr_err = doPluginFNs( op->o_bd, SLAPI_PLUGIN_PRE_MODIFY_FN, pb ); + rs->sr_err = slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_PRE_MODIFY_FN, pb ); if ( rs->sr_err < 0 ) { /* * A preoperation plugin failure will abort the @@ -549,7 +549,7 @@ do_modify( #if defined( LDAP_SLAPI ) } /* modlist != NULL */ - if ( pb && doPluginFNs( op->o_bd, SLAPI_PLUGIN_POST_MODIFY_FN, pb ) < 0 ) { + if ( pb != NULL && slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_POST_MODIFY_FN, pb ) < 0 ) { #ifdef NEW_LOGGING LDAP_LOG( OPERATION, INFO, "do_modify: modify postoperation plugins " "failed\n", 0, 0, 0 ); diff --git a/servers/slapd/modrdn.c b/servers/slapd/modrdn.c index 2a6acd386c..6f83037338 100644 --- a/servers/slapd/modrdn.c +++ b/servers/slapd/modrdn.c @@ -324,7 +324,7 @@ do_modrdn( slapi_pblock_set( pb, SLAPI_MODRDN_DELOLDRDN, (void *)deloldrdn ); slapi_pblock_set( pb, SLAPI_MANAGEDSAIT, (void *)manageDSAit ); - rs->sr_err = doPluginFNs( op->o_bd, SLAPI_PLUGIN_PRE_MODRDN_FN, pb ); + rs->sr_err = slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_PRE_MODRDN_FN, pb ); if ( rs->sr_err < 0 ) { /* * A preoperation plugin failure will abort the @@ -409,7 +409,7 @@ do_modrdn( } #if defined( LDAP_SLAPI ) - if ( pb && doPluginFNs( op->o_bd, SLAPI_PLUGIN_POST_MODRDN_FN, pb ) < 0 ) { + if ( pb != NULL && slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_POST_MODRDN_FN, pb ) < 0 ) { #ifdef NEW_LOGGING LDAP_LOG( OPERATION, INFO, "do_modrdn: modrdn postoperation plugins " "failed\n", 0, 0, 0 ); diff --git a/servers/slapd/result.c b/servers/slapd/result.c index 23b45f0892..0f0a61a30e 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -593,13 +593,13 @@ slap_send_ldap_result( Operation *op, SlapReply *rs ) * should just set SLAPI_RESULT_CODE rather than sending a * result if they wish to change the result. */ - if ( op->o_pb ) { + if ( op->o_pb != NULL ) { slapi_int_pblock_set_operation( op->o_pb, op ); slapi_pblock_set( op->o_pb, SLAPI_RESULT_CODE, (void *)rs->sr_err ); slapi_pblock_set( op->o_pb, SLAPI_RESULT_TEXT, (void *)rs->sr_text ); slapi_pblock_set( op->o_pb, SLAPI_RESULT_MATCHED, (void *)rs->sr_matched ); - (void) doPluginFNs( op->o_bd, SLAPI_PLUGIN_PRE_RESULT_FN, op->o_pb ); + (void) slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_PRE_RESULT_FN, op->o_pb ); } #endif /* LDAP_SLAPI */ diff --git a/servers/slapd/root_dse.c b/servers/slapd/root_dse.c index 91db21e13d..d1e89c6f91 100644 --- a/servers/slapd/root_dse.c +++ b/servers/slapd/root_dse.c @@ -153,7 +153,7 @@ root_dse_info( #ifdef LDAP_SLAPI /* netscape supportedExtension */ - for ( i = 0; (bv = ns_get_supported_extop(i)) != NULL; i++ ) { + for ( i = 0; (bv = slapi_int_get_supported_extop(i)) != NULL; i++ ) { vals[0] = *bv; if( attr_merge( e, ad_supportedExtension, vals, NULL )) { return LDAP_OTHER; diff --git a/servers/slapd/search.c b/servers/slapd/search.c index 73f82a0043..1bbe73e2dc 100644 --- a/servers/slapd/search.c +++ b/servers/slapd/search.c @@ -36,11 +36,12 @@ #ifdef LDAP_SLAPI #include "slapi.h" + static char **anlist2charray( Operation *op, AttributeName *an ); -static void initSearchPlugin( Operation *op, char **attrs, int managedsait ); -static int doPreSearchPluginFNs( Operation *op ); -static int doSearchRewriteFNs( Operation *op ); -static void doPostSearchPluginFNs( Operation *op ); +static void init_search_pblock( Operation *op, char **attrs, int managedsait ); +static int call_search_preop_plugins( Operation *op ); +static int call_search_rewrite_plugins( Operation *op ); +static void call_search_postop_plugins( Operation *op ); #endif /* LDAPI_SLAPI */ int @@ -276,10 +277,10 @@ do_search( #ifdef LDAP_SLAPI if ( op->o_pb ) { attrs = anlist2charray( op, op->ors_attrs ); - initSearchPlugin( op, attrs, manageDSAit ); - rs->sr_err = doPreSearchPluginFNs( op ); + init_search_pblock( op, attrs, manageDSAit ); + rs->sr_err = call_search_preop_plugins( op ); if ( rs->sr_err ) break; - doSearchRewriteFNs( op ); + call_search_rewrite_plugins( op ); } #endif /* LDAP_SLAPI */ rs->sr_err = root_dse_info( op->o_conn, &entry, &rs->sr_text ); @@ -294,10 +295,10 @@ do_search( #ifdef LDAP_SLAPI if ( op->o_pb ) { attrs = anlist2charray( op, op->ors_attrs ); - initSearchPlugin( op, attrs, manageDSAit ); - rs->sr_err = doPreSearchPluginFNs( op ); + init_search_pblock( op, attrs, manageDSAit ); + rs->sr_err = call_search_preop_plugins( op ); if ( rs->sr_err ) break; - doSearchRewriteFNs( op ); + call_search_rewrite_plugins( op ); } #endif /* LDAP_SLAPI */ rs->sr_err = schema_info( &entry, &rs->sr_text ); @@ -306,7 +307,7 @@ do_search( if( rs->sr_err != LDAP_SUCCESS ) { send_ldap_result( op, rs ); #ifdef LDAP_SLAPI - if ( op->o_pb ) doPostSearchPluginFNs( op ); + if ( op->o_pb ) call_search_postop_plugins( op ); #endif /* LDAP_SLAPI */ goto return_results; @@ -324,7 +325,7 @@ do_search( rs->sr_err = LDAP_SUCCESS; send_ldap_result( op, rs ); #ifdef LDAP_SLAPI - if ( op->o_pb ) doPostSearchPluginFNs( op ); + if ( op->o_pb ) call_search_postop_plugins( op ); #endif /* LDAP_SLAPI */ goto return_results; } @@ -386,13 +387,13 @@ do_search( #ifdef LDAP_SLAPI if ( op->o_pb ) { attrs = anlist2charray( op, op->ors_attrs ); - initSearchPlugin( op, attrs, manageDSAit ); - rs->sr_err = doPreSearchPluginFNs( op ); + init_search_pblock( op, attrs, manageDSAit ); + rs->sr_err = call_search_preop_plugins( op ); if ( rs->sr_err != LDAP_SUCCESS ) { goto return_results; } - doSearchRewriteFNs( op ); + call_search_rewrite_plugins( op ); } #endif /* LDAP_SLAPI */ @@ -405,7 +406,7 @@ do_search( } #ifdef LDAP_SLAPI - if ( op->o_pb ) doPostSearchPluginFNs( op ); + if ( op->o_pb ) call_search_postop_plugins( op ); #endif /* LDAP_SLAPI */ return_results:; @@ -451,7 +452,7 @@ static char **anlist2charray( Operation *op, AttributeName *an ) return attrs; } -static void initSearchPlugin( Operation *op, +static void init_search_pblock( Operation *op, char **attrs, int managedsait ) { slapi_int_pblock_set_operation( op->o_pb, op ); @@ -467,21 +468,21 @@ static void initSearchPlugin( Operation *op, slapi_pblock_set( op->o_pb, SLAPI_MANAGEDSAIT, (void *)managedsait ); } -static int doPreSearchPluginFNs( Operation *op ) +static int call_search_preop_plugins( Operation *op ) { int rc; - rc = doPluginFNs( op->o_bd, SLAPI_PLUGIN_PRE_SEARCH_FN, op->o_pb ); + rc = slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_PRE_SEARCH_FN, op->o_pb ); if ( rc < 0 ) { /* * A preoperation plugin failure will abort the * entire operation. */ #ifdef NEW_LOGGING - LDAP_LOG( OPERATION, INFO, "doPreSearchPluginFNs: search preoperation plugin " + LDAP_LOG( OPERATION, INFO, "call_search_preop_plugins: search preoperation plugin " "returned %d\n", rc, 0, 0 ); #else - Debug(LDAP_DEBUG_TRACE, "doPreSearchPluginFNs: search preoperation plugin " + Debug(LDAP_DEBUG_TRACE, "call_search_preop_plugins: search preoperation plugin " "returned %d.\n", rc, 0, 0); #endif if ( ( slapi_pblock_get( op->o_pb, SLAPI_RESULT_CODE, (void *)&rc ) != 0 ) || @@ -495,9 +496,9 @@ static int doPreSearchPluginFNs( Operation *op ) return rc; } -static int doSearchRewriteFNs( Operation *op ) +static int call_search_rewrite_plugins( Operation *op ) { - if ( doPluginFNs( op->o_bd, SLAPI_PLUGIN_COMPUTE_SEARCH_REWRITER_FN, op->o_pb ) == 0 ) { + if ( slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_COMPUTE_SEARCH_REWRITER_FN, op->o_pb ) == 0 ) { int rc; /* @@ -530,7 +531,7 @@ static int doSearchRewriteFNs( Operation *op ) #ifdef NEW_LOGGING LDAP_LOG( OPERATION, ARGS, - "doSearchRewriteFNs: after compute_rewrite_search filter: %s\n", + "call_search_rewrite_plugins: after compute_rewrite_search filter: %s\n", op->ors_filterstr.bv_len ? op->ors_filterstr.bv_val : "empty", 0, 0 ); #else Debug( LDAP_DEBUG_ARGS, " after compute_rewrite_search filter: %s\n", @@ -541,20 +542,20 @@ static int doSearchRewriteFNs( Operation *op ) return LDAP_SUCCESS; } -static void doPostSearchPluginFNs( Operation *op ) +static void call_search_postop_plugins( Operation *op ) { - if ( doPluginFNs( op->o_bd, SLAPI_PLUGIN_POST_SEARCH_FN, op->o_pb ) < 0 ) { + if ( slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_POST_SEARCH_FN, op->o_pb ) < 0 ) { #ifdef NEW_LOGGING - LDAP_LOG( OPERATION, INFO, "doPostSearchPluginFNs: search postoperation plugins " + LDAP_LOG( OPERATION, INFO, "call_search_postop_plugins: search postoperation plugins " "failed\n", 0, 0, 0 ); #else - Debug(LDAP_DEBUG_TRACE, "doPostSearchPluginFNs: search postoperation plugins " + Debug(LDAP_DEBUG_TRACE, "call_search_postop_plugins: search postoperation plugins " "failed.\n", 0, 0, 0); #endif } } -void dummy(void) +void slapi_int_dummy(void) { /* * XXX slapi_search_internal() was no getting pulled diff --git a/servers/slapd/slapi/plugin.c b/servers/slapd/slapi/plugin.c index 70ebf60ef3..23ff7151d6 100644 --- a/servers/slapd/slapi/plugin.c +++ b/servers/slapd/slapi/plugin.c @@ -30,7 +30,7 @@ */ #include -static int loadPlugin( Slapi_PBlock *, const char *, const char *, int, +static int slapi_int_load_plugin( Slapi_PBlock *, const char *, const char *, int, SLAPI_FUNC *, lt_dlhandle * ); /* pointer to link list of extended objects */ @@ -39,7 +39,7 @@ static ExtendedOp *pGExtendedOps = NULL; static Slapi_PBlock *pGPlugins = NULL; /********************************************************************* - * Function Name: newPlugin + * Function Name: plugin_pblock_new * * Description: This routine creates a new Slapi_PBlock structure, * loads in the plugin module and executes the init @@ -61,8 +61,8 @@ static Slapi_PBlock *pGPlugins = NULL; * Messages: None *********************************************************************/ -Slapi_PBlock * -newPlugin( +static Slapi_PBlock * +plugin_pblock_new( int type, const char *path, const char *initfunc, @@ -95,14 +95,14 @@ newPlugin( goto done; } - rc = loadPlugin( pPlugin, path, initfunc, TRUE, NULL, &hdLoadHandle ); + rc = slapi_int_load_plugin( pPlugin, path, initfunc, TRUE, NULL, &hdLoadHandle ); if ( rc != 0 ) { goto done; } if ( slapi_pblock_get( pPlugin, SLAPI_PLUGIN_DESCRIPTION, (void **)&pPluginDesc ) == 0 && pPluginDesc != NULL ) { - slapi_log_error(SLAPI_LOG_TRACE, "newPlugin", + slapi_log_error(SLAPI_LOG_TRACE, "plugin_pblock_new", "Registered plugin %s %s [%s] (%s)\n", pPluginDesc->spd_id, pPluginDesc->spd_version, @@ -120,7 +120,7 @@ done: } /********************************************************************* - * Function Name: insertPlugin + * Function Name: slapi_int_register_plugin * * Description: insert the slapi_pblock structure to the end of the plugin * list @@ -136,7 +136,7 @@ done: * Messages: None *********************************************************************/ int -insertPlugin( +slapi_int_register_plugin( Backend *be, Slapi_PBlock *pPB ) { @@ -174,7 +174,7 @@ insertPlugin( } /********************************************************************* - * Function Name: getAllPluginFuncs + * Function Name: slapi_int_get_plugins * * Description: get the desired type of function pointers defined * in all the plugins @@ -190,7 +190,7 @@ insertPlugin( * Messages: None *********************************************************************/ int -getAllPluginFuncs( +slapi_int_get_plugins( Backend *be, int functype, SLAPI_FUNC **ppFuncPtrs ) @@ -331,7 +331,7 @@ createExtendedOp() /********************************************************************* - * Function Name: removeExtendedOp + * Function Name: slapi_int_unregister_extop * * Description: This routine removes the ExtendedOp structures * asscoiated with a particular extended operation @@ -349,7 +349,7 @@ createExtendedOp() * Messages: None *********************************************************************/ void -removeExtendedOp( +slapi_int_unregister_extop( Backend *pBE, ExtendedOp **opList, Slapi_PBlock *pPB ) @@ -398,7 +398,7 @@ removeExtendedOp( /********************************************************************* - * Function Name: newExtendedOp + * Function Name: slapi_int_register_extop * * Description: This routine creates a new ExtendedOp structure, loads * in the extended op module and put the extended op function address @@ -417,7 +417,7 @@ removeExtendedOp( * Messages: None *********************************************************************/ int -newExtendedOp( +slapi_int_register_extop( Backend *pBE, ExtendedOp **opList, Slapi_PBlock *pPB ) @@ -485,7 +485,7 @@ error_return: } /********************************************************************* - * Function Name: getPluginFunc + * Function Name: slapi_int_get_extop_plugin * * Description: This routine gets the function address for a given function * name. @@ -501,7 +501,7 @@ error_return: * Messages: None *********************************************************************/ int -getPluginFunc( +slapi_int_get_extop_plugin( struct berval *reqoid, SLAPI_FUNC *pFuncAddr ) { @@ -532,12 +532,12 @@ getPluginFunc( } /*************************************************************************** - * This function is similar to getPluginFunc above. except it returns one OID + * This function is similar to slapi_int_get_extop_plugin above. except it returns one OID * per call. It is called from root_dse_info (root_dse.c). * The function is a modified version of get_supported_extop (file extended.c). ***************************************************************************/ struct berval * -ns_get_supported_extop( int index ) +slapi_int_get_supported_extop( int index ) { ExtendedOp *ext; @@ -554,7 +554,7 @@ ns_get_supported_extop( int index ) } /********************************************************************* - * Function Name: loadPlugin + * Function Name: slapi_int_load_plugin * * Description: This routine loads the specified DLL, gets and executes the init function * if requested. @@ -578,7 +578,7 @@ ns_get_supported_extop( int index ) *********************************************************************/ static int -loadPlugin( +slapi_int_load_plugin( Slapi_PBlock *pPlugin, const char *path, const char *initfunc, @@ -624,7 +624,7 @@ loadPlugin( * Special support for computed attribute plugins */ int -doPluginFNs( +slapi_int_call_plugins( Backend *be, int funcType, Slapi_PBlock *pPB ) @@ -637,7 +637,7 @@ doPluginFNs( return 1; } - rc = getAllPluginFuncs( be, funcType, &tmpPlugin ); + rc = slapi_int_get_plugins( be, funcType, &tmpPlugin ); if ( rc != LDAP_SUCCESS || tmpPlugin == NULL ) { /* Nothing to do, front-end should ignore. */ return 1; @@ -672,7 +672,7 @@ doPluginFNs( } int -netscape_plugin( +slapi_int_read_config( Backend *be, const char *fname, int lineno, @@ -720,24 +720,24 @@ netscape_plugin( int rc; Slapi_PBlock *pPlugin; - pPlugin = newPlugin( iType, argv[2], argv[3], + pPlugin = plugin_pblock_new( iType, argv[2], argv[3], numPluginArgc, ppPluginArgv ); if (pPlugin == NULL) { return 1; } if (iType == SLAPI_PLUGIN_EXTENDEDOP) { - rc = newExtendedOp(be, &pGExtendedOps, pPlugin); + rc = slapi_int_register_extop(be, &pGExtendedOps, pPlugin); if ( rc != LDAP_SUCCESS ) { slapi_pblock_destroy( pPlugin ); return 1; } } - rc = insertPlugin( be, pPlugin ); + rc = slapi_int_register_plugin( be, pPlugin ); if ( rc != LDAP_SUCCESS ) { if ( iType == SLAPI_PLUGIN_EXTENDEDOP ) { - removeExtendedOp( be, &pGExtendedOps, pPlugin ); + slapi_int_unregister_extop( be, &pGExtendedOps, pPlugin ); } slapi_pblock_destroy( pPlugin ); return 1; @@ -748,7 +748,7 @@ netscape_plugin( } int -slapi_init(void) +slapi_int_initialize(void) { if ( ldap_pvt_thread_mutex_init( &slapi_hn_mutex ) ) { return -1; diff --git a/servers/slapd/slapi/printmsg.c b/servers/slapd/slapi/printmsg.c index 5cafa3cbd5..916674776b 100644 --- a/servers/slapd/slapi/printmsg.c +++ b/servers/slapd/slapi/printmsg.c @@ -40,7 +40,7 @@ char *slapi_log_file = NULL; int slapi_log_level = SLAPI_LOG_PLUGIN; int -vLogError( +slapi_int_log_error( int level, char *subsystem, char *fmt, diff --git a/servers/slapd/slapi/proto-slapi.h b/servers/slapd/slapi/proto-slapi.h index 329499107c..e994c5f47f 100644 --- a/servers/slapd/slapi/proto-slapi.h +++ b/servers/slapd/slapi/proto-slapi.h @@ -267,16 +267,14 @@ extern int slapi_int_pblock_get_next( Slapi_PBlock **pb ); * Was: plugin.h */ -extern Slapi_PBlock *newPlugin ( int type, const char *path, const char *initfunc, - int argc, char *argv[] ); -extern int insertPlugin(Backend *be, Slapi_PBlock *pPB); -extern int doPluginFNs(Backend *be, int funcType, Slapi_PBlock * pPB); -extern int getAllPluginFuncs(Backend *be, int functype, SLAPI_FUNC **ppFuncPtrs); -extern int newExtendedOp(Backend *pBE, ExtendedOp **opList, Slapi_PBlock *pPB); -extern int getPluginFunc(struct berval *reqoid, SLAPI_FUNC *pFuncAddr ); -extern int netscape_plugin(Backend *be, const char *fname, int lineno, +extern int slapi_int_register_plugin(Backend *be, Slapi_PBlock *pPB); +extern int slapi_int_call_plugins(Backend *be, int funcType, Slapi_PBlock * pPB); +extern int slapi_int_get_plugins(Backend *be, int functype, SLAPI_FUNC **ppFuncPtrs); +extern int slapi_int_register_extop(Backend *pBE, ExtendedOp **opList, Slapi_PBlock *pPB); +extern int slapi_int_get_extop_plugin(struct berval *reqoid, SLAPI_FUNC *pFuncAddr ); +extern int slapi_int_read_config(Backend *be, const char *fname, int lineno, int argc, char **argv ); -extern int slapi_init(void); +extern int slapi_int_initialize(void); /* @@ -285,9 +283,6 @@ extern int slapi_init(void); extern Slapi_PBlock *slapi_search_internal( char *base, int scope, char *filter, LDAPControl **controls, char **attrs, int attrsonly ); -extern Slapi_PBlock *slapi_search_internal_bind( char *bindDN, char *base, - int scope, char *filter, LDAPControl **controls, - char **attrs, int attrsonly ); /* d58508 */ extern Slapi_PBlock *slapi_modify_internal( char *dn, LDAPMod **mods, LDAPControl **controls, int log_change ); extern Slapi_PBlock *slapi_add_entry_internal( Slapi_Entry * e, @@ -300,14 +295,8 @@ extern Slapi_PBlock *slapi_delete_internal( char * dn, LDAPControl **controls, int log_change ); extern Slapi_PBlock *slapi_modrdn_internal( char * olddn, char * newrdn, int deloldrdn, LDAPControl **controls, int log_change); -#if 0 -extern Slapi_PBlock *slapi_modrdn_internal( char * olddn, char * newrdn, - char *newParent, int deloldrdn, LDAPControl **controls, - int log_change); -#endif extern char **slapi_get_supported_extended_ops(void); -extern int duplicateBVMod( LDAPMod *pMod, LDAPMod **ppNewMod ); - +extern struct berval *slapi_int_get_supported_extop( int ); /* * Was: slapi_cl.h diff --git a/servers/slapd/slapi/slapi.h b/servers/slapd/slapi/slapi.h index 9bbaeb8195..c761c373f7 100644 --- a/servers/slapd/slapi/slapi.h +++ b/servers/slapd/slapi/slapi.h @@ -72,8 +72,6 @@ typedef struct strlist { } StrList; #endif -extern struct berval *ns_get_supported_extop( int ); - /* * Was: slapi_utils.h */ diff --git a/servers/slapd/slapi/slapi_ext.c b/servers/slapd/slapi/slapi_ext.c index d785490fbd..c922061430 100644 --- a/servers/slapd/slapi/slapi_ext.c +++ b/servers/slapd/slapi/slapi_ext.c @@ -58,7 +58,7 @@ struct slapi_extension_block { void **extensions; }; -static int getExtensionBlock(int objecttype, void *object, struct slapi_extension_block **eblock, void **parent) +static int get_extension_block(int objecttype, void *object, struct slapi_extension_block **eblock, void **parent) { switch ((slapi_extension_t) objecttype) { case SLAPI_X_EXT_CONNECTION: @@ -81,7 +81,7 @@ static int getExtensionBlock(int objecttype, void *object, struct slapi_extensio return 0; } -static int mapExtensionType(const char *objectname, slapi_extension_t *type) +static int map_extension_type(const char *objectname, slapi_extension_t *type) { if ( strcasecmp( objectname, SLAPI_EXT_CONNECTION ) == 0 ) { *type = SLAPI_X_EXT_CONNECTION; @@ -94,7 +94,9 @@ static int mapExtensionType(const char *objectname, slapi_extension_t *type) return 0; } -static void newExtension(struct slapi_extension_block *eblock, int objecttype, void *object, void *parent, int extensionhandle ) +static void new_extension(struct slapi_extension_block *eblock, + int objecttype, void *object, void *parent, + int extensionhandle ) { slapi_extension_constructor_fnptr constructor; @@ -113,7 +115,7 @@ static void newExtension(struct slapi_extension_block *eblock, int objecttype, v } } -static void freeExtension(struct slapi_extension_block *eblock, int objecttype, void *object, void *parent, int extensionhandle ) +static void free_extension(struct slapi_extension_block *eblock, int objecttype, void *object, void *parent, int extensionhandle ) { slapi_extension_destructor_fnptr destructor; @@ -137,7 +139,7 @@ void *slapi_get_object_extension(int objecttype, void *object, int extensionhand struct slapi_extension_block *eblock; void *parent; - if ( getExtensionBlock( objecttype, object, &eblock, &parent ) != 0 ) { + if ( get_extension_block( objecttype, object, &eblock, &parent ) != 0 ) { return NULL; } @@ -157,13 +159,13 @@ void slapi_set_object_extension(int objecttype, void *object, int extensionhandl struct slapi_extension_block *eblock; void *parent; - if ( getExtensionBlock( objecttype, object, &eblock, &parent ) != 0 ) { + if ( get_extension_block( objecttype, object, &eblock, &parent ) != 0 ) { return; } if ( extensionhandle < registered_extensions.extensions[objecttype].count ) { /* free the old one */ - freeExtension( eblock, objecttype, object, parent, extensionhandle ); + free_extension( eblock, objecttype, object, parent, extensionhandle ); /* constructed by caller */ eblock->extensions[extensionhandle] = extension; @@ -186,7 +188,7 @@ int slapi_register_object_extension( ldap_pvt_thread_mutex_lock( ®istered_extensions.mutex ); - rc = mapExtensionType( objectname, &type ); + rc = map_extension_type( objectname, &type ); if ( rc != 0 ) { ldap_pvt_thread_mutex_unlock( ®istered_extensions.mutex ); return rc; @@ -271,7 +273,7 @@ int slapi_int_create_object_extensions(int objecttype, void *object) if ( registered_extensions.extensions[objecttype].count ) { eblock->extensions = (void **)slapi_ch_calloc( registered_extensions.extensions[objecttype].count, sizeof(void *) ); for ( i = 0; i < registered_extensions.extensions[objecttype].count; i++ ) { - newExtension( eblock, objecttype, object, parent, i ); + new_extension( eblock, objecttype, object, parent, i ); } } else { eblock->extensions = NULL; @@ -311,7 +313,7 @@ int slapi_int_free_object_extensions(int objecttype, void *object) if ( eblock->extensions != NULL ) { for ( i = registered_extensions.extensions[objecttype].count - 1; i >= 0; --i ) { - freeExtension( eblock, objecttype, object, parent, i ); + free_extension( eblock, objecttype, object, parent, i ); } slapi_ch_free( (void **)&eblock->extensions ); @@ -333,7 +335,7 @@ int slapi_int_clear_object_extensions(int objecttype, void *object) struct slapi_extension_block *eblock; void *parent; - if ( getExtensionBlock( objecttype, object, &eblock, &parent ) != 0 ) { + if ( get_extension_block( objecttype, object, &eblock, &parent ) != 0 ) { return -1; } @@ -343,11 +345,11 @@ int slapi_int_clear_object_extensions(int objecttype, void *object) } for ( i = registered_extensions.extensions[objecttype].count - 1; i >= 0; --i ) { - freeExtension( eblock, objecttype, object, parent, i ); + free_extension( eblock, objecttype, object, parent, i ); } for ( i = 0; i < registered_extensions.extensions[objecttype].count; i++ ) { - newExtension( eblock, objecttype, object, parent, i ); + new_extension( eblock, objecttype, object, parent, i ); } return 0; diff --git a/servers/slapd/slapi/slapi_ops.c b/servers/slapd/slapi/slapi_ops.c index 8a42e14eae..3e42bb727c 100644 --- a/servers/slapd/slapi/slapi_ops.c +++ b/servers/slapd/slapi/slapi_ops.c @@ -120,7 +120,7 @@ internal_search_reference( } static Connection * -slapiConnectionInit( +slapi_int_init_connection( char *DN, int OpType ) { @@ -225,7 +225,7 @@ slapiConnectionInit( return pConn; } -static void slapiConnectionDestroy( Connection **pConn ) +static void slapi_int_connection_destroy( Connection **pConn ) { Connection *conn = *pConn; Operation *op; @@ -330,15 +330,15 @@ bvptr2obj_copy( } /* - * Function : LDAPModToEntry + * Function : slapi_int_ldapmod_to_entry * convert a dn plus an array of LDAPMod struct ptrs to an entry structure * with a link list of the correspondent attributes. * Return value : LDAP_SUCCESS * LDAP_NO_MEMORY * LDAP_OTHER */ -Entry * -LDAPModToEntry( +static Entry * +slapi_int_ldapmod_to_entry( char *ldn, LDAPMod **mods ) { @@ -526,7 +526,7 @@ slapi_delete_internal( goto cleanup; } - pConn = slapiConnectionInit( NULL, LDAP_REQ_DELETE ); + pConn = slapi_int_init_connection( NULL, LDAP_REQ_DELETE ); if (pConn == NULL) { rs.sr_err = LDAP_NO_MEMORY; goto cleanup; @@ -582,7 +582,7 @@ cleanup: pSavePB = pPB; } - slapiConnectionDestroy( &pConn ); + slapi_int_connection_destroy( &pConn ); return (pSavePB); #else @@ -592,7 +592,7 @@ cleanup: #ifdef LDAP_SLAPI static Slapi_PBlock * -slapi_add_entry_internal_locked( +slapi_int_add_entry_locked( Slapi_Entry **e, LDAPControl **controls, int log_changes ) @@ -610,7 +610,7 @@ slapi_add_entry_internal_locked( goto cleanup; } - pConn = slapiConnectionInit( NULL, LDAP_REQ_ADD ); + pConn = slapi_int_init_connection( NULL, LDAP_REQ_ADD ); if ( pConn == NULL ) { rs.sr_err = LDAP_NO_MEMORY; goto cleanup; @@ -661,7 +661,7 @@ cleanup: pSavePB = pPB; } - slapiConnectionDestroy( &pConn ); + slapi_int_connection_destroy( &pConn ); return( pSavePB ); } @@ -682,7 +682,7 @@ slapi_add_entry_internal( * by the caller being placed in the cache. */ entry = slapi_entry_dup( e ); - pb = slapi_add_entry_internal_locked( &entry, controls, log_changes ); + pb = slapi_int_add_entry_locked( &entry, controls, log_changes ); if ( entry != NULL ) { slapi_entry_free( entry ); } @@ -719,7 +719,7 @@ slapi_add_internal( } if ( rc == LDAP_SUCCESS ) { - pEntry = LDAPModToEntry( dn, mods ); + pEntry = slapi_int_ldapmod_to_entry( dn, mods ); if ( pEntry == NULL ) { rc = LDAP_OTHER; } @@ -729,7 +729,7 @@ slapi_add_internal( pb = slapi_pblock_new(); slapi_pblock_set( pb, SLAPI_PLUGIN_INTOP_RESULT, (void *)rc ); } else { - pb = slapi_add_entry_internal_locked( &pEntry, controls, log_changes ); + pb = slapi_int_add_entry_locked( &pEntry, controls, log_changes ); } if ( pEntry != NULL ) { @@ -773,7 +773,7 @@ slapi_modrdn_internal( int isCritical; SlapReply rs = { REP_RESULT }; - pConn = slapiConnectionInit( NULL, LDAP_REQ_MODRDN); + pConn = slapi_int_init_connection( NULL, LDAP_REQ_MODRDN); if ( pConn == NULL) { rs.sr_err = LDAP_NO_MEMORY; goto cleanup; @@ -861,7 +861,7 @@ cleanup: pSavePB = pPB; } - slapiConnectionDestroy( &pConn ); + slapi_int_connection_destroy( &pConn ); return( pSavePB ); #else @@ -911,7 +911,7 @@ slapi_modify_internal( goto cleanup; } - pConn = slapiConnectionInit( NULL, LDAP_REQ_MODIFY ); + pConn = slapi_int_init_connection( NULL, LDAP_REQ_MODIFY ); if ( pConn == NULL ) { rs.sr_err = LDAP_NO_MEMORY; goto cleanup; @@ -1066,7 +1066,7 @@ cleanup: pSavePB = pPB; } - slapiConnectionDestroy( &pConn ); + slapi_int_connection_destroy( &pConn ); return ( pSavePB ); #else @@ -1075,8 +1075,7 @@ cleanup: } Slapi_PBlock * -slapi_search_internal_bind( - char *bindDN, +slapi_search_internal( char *ldn, int scope, char *filStr, @@ -1101,7 +1100,7 @@ slapi_search_internal_bind( SlapReply rs = { REP_RESULT }; - c = slapiConnectionInit( NULL, LDAP_REQ_SEARCH ); + c = slapi_int_init_connection( NULL, LDAP_REQ_SEARCH ); if ( c == NULL ) { rs.sr_err = LDAP_NO_MEMORY; goto cleanup; @@ -1251,7 +1250,7 @@ cleanup: pSavePB = ptr; } - slapiConnectionDestroy( &c ); + slapi_int_connection_destroy( &c ); return( pSavePB ); #else @@ -1259,20 +1258,3 @@ cleanup: #endif /* LDAP_SLAPI */ } -Slapi_PBlock * -slapi_search_internal( - char *base, - int scope, - char *filStr, - LDAPControl **controls, - char **attrs, - int attrsonly ) -{ -#ifdef LDAP_SLAPI - return slapi_search_internal_bind( NULL, base, scope, filStr, - controls, attrs, attrsonly ); -#else - return NULL; -#endif /* LDAP_SLAPI */ -} - diff --git a/servers/slapd/slapi/slapi_utils.c b/servers/slapd/slapi/slapi_utils.c index 4cd38f9fb6..e6b0f523e3 100644 --- a/servers/slapd/slapi/slapi_utils.c +++ b/servers/slapd/slapi/slapi_utils.c @@ -1323,7 +1323,7 @@ slapiControlOp2SlapControlMask(unsigned long slapi_mask, } static int -parseSlapiControl( +slapi_int_parse_control( Operation *op, SlapReply *rs, LDAPControl *ctrl ) @@ -1344,7 +1344,7 @@ slapi_register_supported_control( slapiControlOp2SlapControlMask( controlops, &controlmask ); - register_supported_control( controloid, controlmask, NULL, parseSlapiControl ); + register_supported_control( controloid, controlmask, NULL, slapi_int_parse_control ); #endif /* LDAP_SLAPI */ } @@ -1425,7 +1425,7 @@ slapi_get_supported_extended_ops( void ) ; } - for ( j = 0; ns_get_supported_extop( j ) != NULL; j++ ) { + for ( j = 0; slapi_int_get_supported_extop( j ) != NULL; j++ ) { ; } @@ -1447,7 +1447,7 @@ slapi_get_supported_extended_ops( void ) for ( ; k < j; k++ ) { struct berval *bv; - bv = ns_get_supported_extop( k ); + bv = slapi_int_get_supported_extop( k ); assert( bv != NULL ); ppExtOpOID[ i + k ] = bv->bv_val; @@ -2148,7 +2148,7 @@ slapi_get_hostname( void ) /* * FIXME: this should go in an appropriate header ... */ -extern int vLogError( int level, char *subsystem, char *fmt, va_list arglist ); +extern int slapi_int_log_error( int level, char *subsystem, char *fmt, va_list arglist ); int slapi_log_error( @@ -2162,7 +2162,7 @@ slapi_log_error( va_list arglist; va_start( arglist, fmt ); - rc = vLogError( severity, subsystem, fmt, arglist ); + rc = slapi_int_log_error( severity, subsystem, fmt, arglist ); va_end( arglist ); return rc; @@ -2275,7 +2275,7 @@ slapi_free_search_results_internal( Slapi_PBlock *pb ) /* * Internal API to prime a Slapi_PBlock with a Backend. */ -static int initBackendPB( Slapi_PBlock *pb, Backend *be ) +static int slapi_int_pblock_set_backend( Slapi_PBlock *pb, Backend *be ) { int rc; @@ -2337,7 +2337,7 @@ static char *Authorization2AuthType( AuthorizationInformation *authz, int is_tls /* * Internal API to prime a Slapi_PBlock with a Connection. */ -static int initConnectionPB( Slapi_PBlock *pb, Connection *conn ) +static int slapi_int_pblock_set_connection( Slapi_PBlock *pb, Connection *conn ) { char *connAuthType; int rc; @@ -2443,11 +2443,11 @@ int slapi_int_pblock_set_operation( Slapi_PBlock *pb, Operation *op ) isUpdateDn = be_isupdate( op->o_bd, &op->o_ndn ); } - rc = initBackendPB( pb, op->o_bd ); + rc = slapi_int_pblock_set_backend( pb, op->o_bd ); if ( rc != LDAP_SUCCESS ) return rc; - rc = initConnectionPB( pb, op->o_conn ); + rc = slapi_int_pblock_set_connection( pb, op->o_conn ); if ( rc != LDAP_SUCCESS ) return rc; @@ -3035,7 +3035,7 @@ static int checkBVString(const struct berval *bv) return 1; } -#endif +#endif /* LDAP_SLAPI */ int slapi_value_get_int(const Slapi_Value *value) { @@ -3639,7 +3639,7 @@ int slapi_compute_add_evaluator(slapi_compute_callback_t function) goto done; } - rc = insertPlugin( NULL, pPlugin ); + rc = slapi_int_register_plugin( NULL, pPlugin ); if ( rc != 0 ) { rc = LDAP_OTHER; goto done; @@ -3684,7 +3684,7 @@ int slapi_compute_add_search_rewriter(slapi_search_rewrite_callback_t function) goto done; } - rc = insertPlugin( NULL, pPlugin ); + rc = slapi_int_register_plugin( NULL, pPlugin ); if ( rc != 0 ) { rc = LDAP_OTHER; goto done; @@ -3713,7 +3713,7 @@ int compute_evaluator(computed_attr_context *c, char *type, Slapi_Entry *e, slap int rc = 0; slapi_compute_callback_t *pGetPlugin, *tmpPlugin; - rc = getAllPluginFuncs( NULL, SLAPI_PLUGIN_COMPUTE_EVALUATOR_FN, (SLAPI_FUNC **)&tmpPlugin ); + rc = slapi_int_get_plugins( NULL, SLAPI_PLUGIN_COMPUTE_EVALUATOR_FN, (SLAPI_FUNC **)&tmpPlugin ); if ( rc != LDAP_SUCCESS || tmpPlugin == NULL ) { /* Nothing to do; front-end should ignore. */ return 0; @@ -3750,7 +3750,7 @@ int compute_rewrite_search_filter(Slapi_PBlock *pb) return rc; } - return doPluginFNs( be, SLAPI_PLUGIN_COMPUTE_SEARCH_REWRITER_FN, pb ); + return slapi_int_call_plugins( be, SLAPI_PLUGIN_COMPUTE_SEARCH_REWRITER_FN, pb ); #else return -1; #endif /* LDAP_SLAPI */ @@ -3917,7 +3917,7 @@ int slapi_int_access_allowed( Operation *op, break; } - rc = getAllPluginFuncs( op->o_bd, SLAPI_PLUGIN_ACL_ALLOW_ACCESS, (SLAPI_FUNC **)&tmpPlugin ); + rc = slapi_int_get_plugins( op->o_bd, SLAPI_PLUGIN_ACL_ALLOW_ACCESS, (SLAPI_FUNC **)&tmpPlugin ); if ( rc != LDAP_SUCCESS || tmpPlugin == NULL ) { /* nothing to do; allowed access */ return 1;