]> git.sur5r.net Git - openldap/commitdiff
Cleanup SLAPI namespace
authorLuke Howard <lukeh@openldap.org>
Sun, 28 Dec 2003 04:14:19 +0000 (04:14 +0000)
committerLuke Howard <lukeh@openldap.org>
Sun, 28 Dec 2003 04:14:19 +0000 (04:14 +0000)
21 files changed:
servers/slapd/add.c
servers/slapd/backend.c
servers/slapd/bind.c
servers/slapd/compare.c
servers/slapd/config.c
servers/slapd/delete.c
servers/slapd/extended.c
servers/slapd/init.c
servers/slapd/main.c
servers/slapd/modify.c
servers/slapd/modrdn.c
servers/slapd/result.c
servers/slapd/root_dse.c
servers/slapd/search.c
servers/slapd/slapi/plugin.c
servers/slapd/slapi/printmsg.c
servers/slapd/slapi/proto-slapi.h
servers/slapd/slapi/slapi.h
servers/slapd/slapi/slapi_ext.c
servers/slapd/slapi/slapi_ops.c
servers/slapd/slapi/slapi_utils.c

index 1b06371da821674d3c5ce44ab404ad37d4635012..563b33800be3b63af33341ffc6ef15b023d74878 100644 (file)
 
 #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,
index 79eb82d7c9b762c23684d7865e0f6b4813c26e8e..45e80031e63a629f6a6a41447a16dcd70a9ac141 100644 (file)
@@ -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 "
index e881ba6bb8d415918ffbace75ff61562917d4a5d..07c1616279caadd2a4ba4e52788457ddc77eddf9 100644 (file)
@@ -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",
index fdfccea5193fe8ad345aee050ae58846b595ac8a..228983af14d08eb23de5954fb2b2ad3b9ca91bbe 100644 (file)
@@ -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 );
index 584c8eff72d33ede389dd266899247023d6bc821..5861d4dc5b3b85fb92b5b0eaba9ecb4991d66c9e 100644 (file)
@@ -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 );
                        }
index e0a5c38fda7f6119645ac538f6486be96b36b491..8ae91b287fc7fce34c29cd932fb2190c16bb5561 100644 (file)
@@ -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 );
index cb72c4fabf05ef7e2253f688d0561c77d742a6d9..f3e85cf4a0e30c4fef29c5401af815f7b764f866 100644 (file)
@@ -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 )))
index 6ab72623220e8579b275ff378ea5b78a3545cc0f..11d90a8420881fcaa31c901784251638a227360a 100644 (file)
@@ -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 */
 
index d656dec7d1dd45a601a27d59b36ed4357272a815..2879523351dabdf531c14d2dc569d0e4e2f5fedb 100644 (file)
@@ -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
index e390d0acf91be0bc6588dc7e3c8c8417361efa84..db3b5edb3feb9b4f3eca503e3579d8b2ad7b395a 100644 (file)
@@ -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 );
index 2a6acd386cceaa921c1dac5b2bd74d55aef2ee61..6f830373384702d2ec2195f9bcd8d1db29424976 100644 (file)
@@ -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 );
index 23b45f0892303ac13f8dfa15a2678bcab0ad43e0..0f0a61a30e4c3f8d738c83e13bc03fd97683aff7 100644 (file)
@@ -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 */
 
index 91db21e13d5edd125f0ccb02c837f4c2994e6fda..d1e89c6f91d7a39684a7846ef6ef571691b80988 100644 (file)
@@ -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;
index 73f82a00437f36bf1482e476dcb9e4086f6dd36d..1bbe73e2dca6b692635709bca390b44215cc95c6 100644 (file)
 
 #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
index 70ebf60ef3185abaebb7e84df863609bad54b1a1..23ff7151d691cffd2d758843cffbc0d06c78c64f 100644 (file)
@@ -30,7 +30,7 @@
  */
 #include <ltdl.h>
 
-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;
index 5cafa3cbd557621d6461172a6f5994b0c1bfa7a9..916674776b6f34a2212d412334c8c509ef2c9371 100644 (file)
@@ -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, 
index 329499107c94906f2c6f7bf1e67916f514f1cf30..e994c5f47f28be856c01a4795bfc39d6b962cff0 100644 (file)
@@ -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
index 9bbaeb81953aebde0f10521e1d4809dd2def1ac4..c761c373f739f9e8975986995827f463e53ef055 100644 (file)
@@ -72,8 +72,6 @@ typedef struct strlist {
 } StrList;
 #endif
 
-extern struct berval *ns_get_supported_extop( int );
-
 /*
  * Was: slapi_utils.h
  */
index d785490fbda6473cfe41b67aab8a97b534d15b05..c922061430c2bae04533a8aadb29a43da96863aa 100644 (file)
@@ -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( &registered_extensions.mutex );
 
-       rc = mapExtensionType( objectname, &type );
+       rc = map_extension_type( objectname, &type );
        if ( rc != 0 ) {
                ldap_pvt_thread_mutex_unlock( &registered_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;
index 8a42e14eae19b2242fc7915f5859c27fb22bfff7..3e42bb727c8fffbe6c9cdddc50ff119d9382a10b 100644 (file)
@@ -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 */
-}
-
index 4cd38f9fb6f4bcc7ce14b0ccb45d646bc75c4bf9..e6b0f523e3deeb8680fd202d2ddc3e6ae0c2d930 100644 (file)
@@ -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;